From: "Harry Hiratos" Newsgroups: comp.os.msdos.djgpp Subject: Question about the puts command in C++ Lines: 20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Message-ID: NNTP-Posting-Host: ts55056.powerup.com.au X-Trace: ozemail.com.au 950598409 203.147.172.56 (Tue, 15 Feb 2000 18:06:49 EST) NNTP-Posting-Date: Tue, 15 Feb 2000 18:06:49 EST Organization: OzEmail Pty Ltd, Australia Distribution: world Date: Tue, 15 Feb 2000 17:04:35 +1000 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I have written a program which includes the following lines: Employee Sarah; cout << "Her salary is : " << Sarah.getMessage(); where Sarah is an object of class Employee. The function getMessage is defined inline as follows: char getMessage() { puts( message ); } When I run this program, it prints the words "Her salary is : " on the line immediately after the output of getMessage, instead of before it on the same line. Can someone explain to me why this happens, as I have not been able to find an answer in my C++ text books? Regards Harry