TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: ROGER SCUDDER
from: JONATHAN DE BOYNE POLLARD
date: 1998-02-27 19:51:00
subject: C++ Saveding stuff

 RS>  Here's something I'm not clear about...
 RS> #include 
 RS> int main( void )
 RS> {
 RS>     ifstream source ("infile");
 RS>     if(!source)
 RS>         blablabla...
 RS>  When is the file opened in that snip?  
In the constructor for the object `source'.
 RS> Is the reason this works the same as why the next line works?
 TM>>>>>     ofstream("file1.fil") << name;
Pretty much.  The syntax there creates an unnamed temporary ofstream object 
for use in the rest of the expression.
 ¯ JdeBP ®
--- FleetStreet 1.19 NR
---------------
* Origin: JdeBP's point, using Squish (2:440/4.3)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.