Skip to main content
GameDev.net gamedev.net
🔒 Locked

mistake?

Started by garconbifteck Dec 28, 2001 at 2:10 PM 8 replies 550+ views
Original Post
garconbifteck
garconbifteck
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
ShadeStorm
ShadeStorm
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
ShadeStorm, the Day_Glo Fish
garconbifteck
garconbifteck
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
zealouselixir
zealouselixir
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:
::

[twitter]warrenm[/twitter]
garconbifteck
garconbifteck


Edited by - garconbifteck on December 28, 2001 6:57:00 PM
ShadeStorm
ShadeStorm
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
ShadeStorm, the Day_Glo Fish
garconbifteck
garconbifteck
Thanks thats what i wanted to know , also could you expand on my vocab by telling me what "typo" means!!? :p
insiej
insiej
A typo is a mistake with typing. If I want to write hello but I write hallo de A is the typo.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.