delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/17/12:19:26

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Hannu E K Nevalainen \(garbage mail\)" <garbage_collector AT telia DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: g++ iostream broken on windows 2000
Date: Wed, 17 Sep 2003 18:18:00 +0200
Message-ID: <NGBBLLIAMFLGJEOAJCCEMEDKDEAA.garbage_collector@telia.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
Importance: Normal
In-Reply-To: <1063753054.759.4.camel@localhost>
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

> From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf
> Of Robert Collins

> Oh, and in your output, get rid of the \n, use
> cout << "foo" << endl;

Now, this is off topic, it belongs in nntp://comp.sys.lang.c++ or some
such... but anyway:


To make it more verbose:
 This makes your code easier to port (take to other environments).

End of line, i.e. \n and \r in combinations, depends on which OS you are
using... "endl" is always right.

BTW: I find code that looks like this a lot more readable:

        cout
		<< "Welcome to C++" 		<< endl
            << "Hope you learn a lot" 	<< endl
		;

But, I guess, this might cause some sensitive people to start grumblin' ;-)

Ref:
http://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=%2B%22c%2B%2B%22+%2B%
22white+space%22+%2B%22formatting%22+%2B%22code%22
e.g. http://www.osdata.com/topic/language/cplus.htm ("C++", third link from
the googling above)

/Hannu E K Nevalainen, B.Sc. EE - 59°16.37'N, 17°12.60'E
-- UTC+1, GMT+1, CET --
--END OF MESSAGE--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019