www.delorie.com/archives/browse.cgi | search |
From: | dontmailme AT iname DOT com (Steamer) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: output x,y,z |
Date: | Wed, 07 Mar 2001 10:51:42 GMT |
Organization: | always disorganized |
Lines: | 26 |
Message-ID: | <3aa612bc.3627377@news.freeserve.net> |
References: | <%yep6.181$DQ5 DOT 17990 AT sapphire DOT mtt DOT net> |
NNTP-Posting-Host: | modem-220.fu-manchu-lion-fish.dialup.pol.co.uk |
X-Trace: | news8.svr.pol.co.uk 983962303 9953 62.136.215.220 (7 Mar 2001 10:51:43 GMT) |
NNTP-Posting-Date: | 7 Mar 2001 10:51:43 GMT |
X-Complaints-To: | abuse AT theplanet DOT net |
X-Newsreader: | Forte Free Agent 1.11/32.235 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
Stewart wrote: > Will someone explain how each output is calculated and how each output > is determined? I want to know how the output is evaluated. > > int x = 4; > int y = 5; > double z = 7.8; > > cout << x << " " << y << " " << z << endl << endl; > double x = 6.7; > cout << x << " " << y << " " << z << endl << endl; > double y = 9.2; > cout << x << " " << y << " " << z << endl; It's hard to know what you're asking, especially as your code doesn't compile. When you have an expression like cout << foo; then the function that is called depends on the type of 'foo'. For many types, the C++ Standard specifies what the output should be (and what other effects, if any, occur). For other types you can define your own operator<< to do whatever you like.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |