Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

garconbifteck

mistake?

This topic is 6114 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

if anyone has the book "teach yourself c++ in 21 days - jesse liberty" could you tell me if there is a mistake..... on pages 26 and 27 look at line 6 of ''listing 2.2'' on page 27 it says that will produce: The manipulator endl writes a new line to the screen. however it produces: The manipulator std::endl writes a new line to the screen. I just wanna know is the mistake the book or my compiler or what i''m sure it does sound a bit fussy

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by garconbifteck
on pages 26 and 27 look at line 6 of 'listing 2.2' on page 27 it says that will produce:

The manipulator endl writes a new line to the screen.

however it produces:

The manipulator std::endl writes a new line to the screen.



That what? There's either a typo in there or English is not your first language, in either case it's ok, I just don't know what you are talking about. If you could be a little more clear about what the problem is I'll try to answer you.



ShadeStorm, the Day_Glo Fish


PS-I'm guessing you are French from the nickname.

Edited by - ShadeStorm on December 28, 2001 5:19:29 PM

Share this post


Link to post
Share on other sites
hmm, ok.... it says that writing this:

std::cout << "The manipulator std:endl ";

will produce

The manipulator endl

however it produces

The manipulator std::endl

and i think in my own head it is the book writer/publishers mistake... do you get what i mean now?

---

 -http://garconbifteck.cjb.net/
  -www.pc-gaming.com
Garcon Bifteck


Edited by - garconbifteck on December 28, 2001 5:42:49 PM

Share this post


Link to post
Share on other sites
Darn. They took Teach Yourself C++ in 21 Days off of informit.com''s free library. Oh well...

Anyway, I''m betting that''s just a typo. Doubtlessly, a line as

std::cout << "The manipulator std::endl ";

should be pretty straightforward in its effect. I can''t really tell what you''re asking since you''ve been changing your question and messing up your SRops, but I wouldn''t worry about it too much.

Later,
ZE.


SRops means "scope resolution operators," btw. They look like this:
::

Share this post


Link to post
Share on other sites
Ok, I get it now. Yeah, that''s a typo in the book. Unless one of the characters in question is a backslash, the part in double quotes after the stream insertion operator will come out exactly as typed.



ShadeStorm, the Day_Glo Fish

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!