From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f8a1,a35e2903c34eff64,start X-Google-Attributes: gid10f8a1,public X-Google-Thread: 1164f8,a35e2903c34eff64,start X-Google-Attributes: gid1164f8,public From: Edward L Bolson Subject: Re: Questions with stream I/O in DEC C++ (cxx) on Digital Unix Date: 1997/05/09 Message-ID: <33738DBB.15FB@u.washington.edu>#1/1 X-Deja-AN: 240573796 References: <33738375.2781@u.washington.edu> Organization: Cardiac Imaging Laboratory/University of Washington Newsgroups: comp.sys.dec,vmsnet.alpha Edward L Bolson wrote: > > I have ported several programs from an SGI, running IRIX 5.3 and CC. > These programs compile and run on our Alpha running 4.0b, with some of > the output exactly the same as on the SGI. > > HOWEVER, much of the file output seems to be either out of order and > nonexistent. This is all text using the << type output operators. > I can follow the code in the debugger, and, for instance, if it is > supposed to output the locations of 600 points, it goes through the loop > 600 times, but only about 400 lines end up in the output file. Then > further output from later in the program shows up properly. > > I am at wit's end. I will see if I can find anything in language > release notes about caveats, but would like to know if this is a known > problem. > > I have checked the public patches and the ECO CD-ROM, and believe I am > up-to-date on everything. > > Thanks for any advice. > > Ed Well, the Using DEC C++ notes say that: cout << "\n"; doesn't do a flush, since the C++ standard doesn't require it. I should use: cout << ... << endl; instead. I tried it. Apparently that is indeed the ticket. I hope noone has to respond before they see the solution! Ed -- Ed Bolson University of Washington Cardiac Imaging Lab (206)543-4535 bolson@u.washington.edu http://weber.u.washington.edu/~bolson Box 356422, Room RR 616 Health Science Building, Seattle, WA, 98195-6422