Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
From: "Hannu E K Nevalainen \(garbage mail\)" <garbage_collector@telia.com>
To: <cygwin@cygwin.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
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 8bit
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@cygwin.com [mailto:cygwin-owner@cygwin.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/

