Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Practical C++

timothy posted more than 10 years ago | from the practice dept.

Programming 307

jsight writes with his review of Rob McGregor's Practical C++, published by QUE. He writes "Some books attempt to do one thing really well, and others attempt a little of everything. This book is clearly an example of the latter, in full force. Weighing in at a hefty 900 pages, you would expect this book to be crammed with chapters and details on every aspect of the STL and basic C++. In the following review, I am going to cover where it succeeds in doing this, and where it fails." (This book has been out for a few years; what books would make more sense today for a C++ learner's library?)

Section I -- Programming 101

At first glance, the book appears to be written for people with experience programming, however reading through this section clearly dispels that myth. Here we have a section which goes over everything from for loops to if conditionals while simultaneously using verbose, duplicitous language at every step. Perhaps this was intended as a means of reinforcement, however, it seems most of the effort here would be wasted.

The technical depth is what you would expect for a novice, but without enough hand-holding and examples to make a novice feel comfortable. Making matters worse, there are numerous typos in this section, including quite a few in the examples (making them uncompilable without corrections). Some of these appear to be type-setting errors, however, there are enough to potentially confuse novice developers.

I believe that the combination of weak examples, and significant typographical errors are strong enough to give a novice much difficulty in learning the C++ language.

Having said that, the section should be provide no difficulty for any programmer with a good knowledge of any vaguely similar language (eg, Perl, Java, PHP, etc).

Section II -- Beyond the Basics

Ah, now we're getting down to Brass Tacks... this section goes over everything from Function overloading to Structure and Unions. The section on function members within structures also does an excellent job of preparing the reader for the upcoming introduction of Object Oriented concepts.

The sections on Memory management, both from an allocation standpoint, and from a bit manipulation standpoint are first-rate. Details are perhaps not as strong as they could have been, however the material is very accessible, and clearly described.

Probably my only complaint with this chapter is the overly general section on compiling and debugging programs. However, as this book does attempt to be somewhat compiler/debugger agnostic, this is forgivable. From here, we dive into the real power of C++, Object Orientation.

Section III

From the beginning, this book treats Objects as an extension of the structure syntax taught previously (with the default of Public switched to Private). This, along with the classic Plans vs. Product description of the difference between a Class and an Object are quite clear and robust.

Again, this is a solid chapter, describing the details of getting a system of classes up and running, as well as some sample data structure implementations.

And then finally, the last section is a slightly less than 200 page description of the STL. This section is probably the book's weakest part, as it is just strong enough to give you a taste of what is available, but often not strong enough to grasp the details. It's a good start, but much more attention should have been made to this subject (potentially even at the cost of some of the wasted words on how a 'for' loop works). It makes a decent introduction for someone with very limited STL background, however, there is not enough depth to reach a strong level of understanding here.

Summary

Overall, this is a solid book for an existing programmer to pick up C++ concepts. A programmer with a strong knowledge of an existing procedural language (such as C) would have no trouble digesting the concepts of this book. Having said that, the poor typographical issues, and verbose wording often muddle an otherwise good book.


You can purchase Practical C++ from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

Sorry! There are no comments related to the filter you selected.

I feel bad (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#8317122)

What your about to read is true, it is the result of a 3+ year investigation. It will be difficult if not impossible for you to believe even after you read the evidence contained in public releases from military DOD, Dept. of Justice, police, US Patent Office, retired officials, private investigators and then the victims of the crime of the century and perhaps of all time. This is not fiction but something so evil and insidious I thought I should take some time and lead you into it gradually but there is no time, the criminals who are murdering men women and children in their homes by the million require a quick description of the situation; millions have already been murdered in their homes by a hideous science of implantation by microchip and or directed silent electromagnetic energy. This is the truth, a secret international organization sanctioned by all governments despite their serious differences in public with their political objectives exists; this particular international liaison takes precedence in international politics in that all officials across the globe fall silent as to its existence and activity, its as if the activity does not exist for the public. Their goal is multiple and they are the New World Order as they themselves define themselves, evil in nature and structured in the medieval way generally with kings and vassals and knights and we all the peasants if we do not have rank in their evil empire, they consider us mere livestock. At this precipitous time in history there are many events forcing mankind on the brink of cataclysm from nuclear war via nuclear proliferation, the known thinning of the North Pole and the environmental after effects that are known to follow, these two things alone have spawned an evil policy for removal of a serious percentage of the population coupled with the toppling of the free country Americans who in their ideology of freedom represent a threat to the policy being stuffed down the publics throat. The media do stories about what they are told to say, and now because of the internet we are finding out what they have been hiding, which is that those in charge are guilty of serious crimes of human rights abuse here at home. Truth is that the policy is a product of greed wherein those in the old boy power network refused to allow technical fixes out of the bag so to say; the US and European Patent offices are filled with technology that easily with very little development can end all the peoples problems, that now because these inventions were ignored has accelerated the destruction of the warming of the worlds ice which will cause tremendous problems and refusal to allow technical fixes has caused the using up of natural resources which are necessary to support the worlds population. Such statements together with outright greed have spawned the evil policy of secret genocide ( think tanks say the less people the better ). How you ask can something like that which is described here exist and go on undetected; simply put " National Security " . Your right to know under current legal dogma enacted amounts to the following fact; all facets of government are under " Admiralty Law " and this is known to exist under the current US system of law only and by the very display of a fringed flag in all court rooms throughout the US. heady stuff to understand what I say is true and it is. The web site your on is for the purpose of exposing the activities of the group described here at the preface. The secret genocide has been well thought through as a means to keep you and the mass population of the nation from discovering the truth which is millions have been killed and millions are being killed using the most obviously attacked by the electronic device described earlier. The method of hiding something so insidious being done out in the open is pure evil genius. They attack many many people out in the open to promote several agendas. One and the primary agenda is to demonstrate what they want people to understand are the symptoms of being bombarded with electronic weapons, they have such people being attacked out in the open with such extraordinary symptoms that the massive population will see those symptoms as a definition of an attack and never make the connection that the very common and non serious seemingly everyday symptoms they are experiencing are not at all related to such attacks, but they are and seriously so. The second agenda is to cause fear not in the massive population who are being kept from the truth because its under " National Security " regulations to enforce non reporting but to put deep fear into all authorities that such activity can and will go on despite even their authoritarian complaint which is stifled and generates an aura and reality of the criminals being untouchable. What you learn here will likely be brushed off as the ravings of a lunatic until you begin the process of really reading the evidence which is on the bottom of this first page as an index. I warn you that if you ignore this warning to help with all your might we as a people as a nation even as a world have no future; your families will be swept away unless we band together and make the ultimate sacrifice, which is to put aside all and every other agenda's that you may have whether its activism or mundane daily interests. The choice is yours, there will be nowhere to hide and the stakes are to the death. They, as powerful as they are are few; we are many and still have the key positions which can put the brakes on. But it won't happen without your effort. Would you prefer to depend on my effort for your life; do not want that, want to take a hand in this critical day to make a difference whether you work for the government or are a civilian. It cannot be stopped with certainty by either government or the public alone but requires your supreme commitment. There is little time as they grow stronger every day. Think clearly now, you know something is wrong, don't depend on me or others to fix it. Most people cannot be ordered to do anything, but this being an emergency I do think you had better reconsider the following. Do not go from this site without pledging your life to stopping it because it is your life they will take. Do not leave this site and go back to what you were doing as it were, your routine or your job without first making this your prime concern in your life. Ask others what they think and when they play doubting Thomas's ask what about the widespread research and the other evidence. Ask everyone if they have such symptoms and continue to ask for we are all there is in the equation to save our lives. You may be one of the few who in regard to history were called in a spiritual way to be more than you are as a result of reading this now. I ask all of you who read this to become more than you are and never forget this is possibly why you were born, not to be a hero but to do what anyone would do when one truly understands an emergency situation. You should know the following, act quickly and place advertisements around the country as follows: "Activists join with us to support each others agenda's, thereby increasing your effectiveness (your telephone number or mine). Local papers will charge $20. get started, conquer ignorance in your own town! This advertisement will get you in touch with the kind of people that do things that count in the world, they just need to be educated as to this circumstance and maybe through your eloquence or their spirit will rise to the occasion. Your country needs you now. Don't let it down!

Re:I feel bad (0)

Anonymous Coward | more than 10 years ago | (#8317131)

C++. What is it all about... is it good, or is it whack?

Re:I feel bad (0)

Anonymous Coward | more than 10 years ago | (#8317287)

Depends on whether you're talking to a GNOME or KDE guy ;)

"Practical C++" (2, Funny)

alexborges (313924) | more than 10 years ago | (#8317130)

Now THATS an oxymoron...

Its the only language that ive had trouble getting

cout "Hello World!";
(or equivalent)

to compile.

Re:"Practical C++" (2, Insightful)

BoomerSooner (308737) | more than 10 years ago | (#8317141)

Lol

cout "Hello World!";

Thanks for the laugh.

Re:"Practical C++" (1)

shrykk (747039) | more than 10 years ago | (#8317227)

I think you'll find this works in most C++ compilers:
#include <stdio.h>

main()
{
printf ("Hello world!");
}

Re:"Practical C++" (0)

Anonymous Coward | more than 10 years ago | (#8317263)

tsk...

#include <cstdio>
int main()
{
printf("Hello world!\n");
return 0;
}

Re:"Practical C++" (2)

Chris_Jefferson (581445) | more than 10 years ago | (#8317335)

actually the standard specifies that the cstdio-type headers put the functions into the std namespace :)

#include
using namespace std;
int main()
{
printf("Hello world!\n");
}

(yes, the standard does allow you to leave out the return value from main. it will automagically put in a return 0;)

Re:"Practical C++" (0)

Anonymous Coward | more than 10 years ago | (#8317392)

So noted. :)

I always forget whether it is C or C++ that supplies the implicit return 0 from main(). I work with large codebases written in both so keeping all the little details straight presents a challenge sometimes.. :)

Re:"Practical C++" (0)

Anonymous Coward | more than 10 years ago | (#8317481)

#include
yes but you are '#include'ing nothing. that will throw an error.

Re:"Practical C++" (0)

Anonymous Coward | more than 10 years ago | (#8317155)

std::cout "Hello Slashdot";

Re:"Practical C++" (0)

Anonymous Coward | more than 10 years ago | (#8317573)

std::cout "Hello, Idiot" std::endl

Re:"Practical C++" (5, Funny)

Anonymous Coward | more than 10 years ago | (#8317166)

And your mother too

My mother is in fact a software developer and has no problems getting a "Hello World" to compile.

Re:"Practical C++" (2, Funny)

Anonymous Coward | more than 10 years ago | (#8317173)

class omgwtflol {

public static void main ( String args [] ) {

System.out.println("omg i hate teh java!!1");

}
}

Re:"Practical C++" (1)

gregarican (694358) | more than 10 years ago | (#8317198)

Probably using the sign would've helped!

Re:"Practical C++" (1)

SpaceRook (630389) | more than 10 years ago | (#8317256)

The what sign? Looks like you both got your arrows stripped out.

Re:"Practical C++" (1)

gregarican (694358) | more than 10 years ago | (#8317284)

Alright, here it is dammit!

cout << "Hello World!";

I've heard that the Preview button does wonders. Perhaps I should use it every now and then :-|

Re:"Practical C++" (1)

Charvak (97898) | more than 10 years ago | (#8317311)

Either use
using namespace std;
or qualify it as std::cout,otherwise, it will fail in an ANSI compliant compiler.

Re:"Practical C++" (1)

October_30th (531777) | more than 10 years ago | (#8317292)

What sign?

I hope you're not talking about sticking a pink carnation in your hat and, er, making the old sign [passagen.se] ...

Re:"Practical C++" (1)

rice_web (604109) | more than 10 years ago | (#8317206)

(or equivalent)

Maybe that's why you're having trouble.

Re:"Practical C++" (1)

ktulu1115 (567549) | more than 10 years ago | (#8317221)

cout "Hello World!";

I believe your problem is the following: cout << "Hello World!";

ALL LOSERS IN THIS THREAD (-1, Troll)

Anonymous Coward | more than 10 years ago | (#8317225)

no one of you super programmers is smart enough to make the less than sign (<<) appear in slashdot! guess that's it for your programming carreer, losers.

zxc (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#8317132)

4th p0st

n/a (-1, Redundant)

Anonymous Coward | more than 10 years ago | (#8317142)

I, for one, welcome our new C++ overlords!

out of stock? (4, Informative)

fjordboy (169716) | more than 10 years ago | (#8317143)

Contrary to what the article and link said, I don't think you can buy it (new) on bn.com. However, it is available here at amazon.com [amazon.com] for 20.90 new or 9.00 used. Just fyi...

thx (0)

Anonymous Coward | more than 10 years ago | (#8317550)

if (this == theWalrus) {

Goo::Goo(&gooJoob);

}

Book spoiler (5, Funny)

jmv (93421) | more than 10 years ago | (#8317149)

It ends with }

Re:Book spoiler (0)

Anonymous Coward | more than 10 years ago | (#8317281)

And anyone writing the stupid 'it start with } too' jokes, beware. I'ma come over and kick your a$$ ;))

Re:Book spoiler (4, Funny)

david.given (6740) | more than 10 years ago | (#8317398)

It ends with }

No, no, this is C++, remember? It ends with };.

Re:Book spoiler (0)

Anonymous Coward | more than 10 years ago | (#8317500)

It ends with }

And doesn't compile because it's missing the semicolon.

In case of slashdotting (-1, Informative)

Anonymous Coward | more than 10 years ago | (#8317150)

Can anyone offer a mirror?

Section I -- Programming 101
At first glance, the book appears to be written for people with experience programming, however reading through this section clearly dispels that myth. Here we have a section which goes over everything from for loops to if conditionals while simultaneously using verbose, duplicitous language at every step. Perhaps this was intended as a means of reinforcement, however, it seems most of the effort here would be wasted.

The technical depth is what you would expect for a novice, but without enough hand-holding and examples to make a novice feel comfortable. Making matters worse, there are numerous typos in this section, including quite a few in the examples (making them uncompilable without corrections). Some of these appear to be type-setting errors, however, there are enough to potentially confuse novice developers.

I believe that the combination of weak examples, and significant typographical errors are strong enough to give a novice much difficulty in learning the C++ language.

Having said that, the section should be provide no difficulty for any programmer with a good knowledge of any vaguely similar language (eg, Perl, Java, PHP, etc).
Section II -- Beyond the Basics

Ah, now we're getting down to Brass Tacks... this section goes over everything from Function overloading to Structure and Unions. The section on function members within structures also does an excellent job of preparing the reader for the upcoming introduction of Object Oriented concepts.

The sections on Memory management, both from an allocation standpoint, and from a bit manipulation standpoint are first-rate. Details are perhaps not as strong as they could have been, however the material is very accessible, and clearly described.

Probably my only complaint with this chapter is the overly general section on compiling and debugging programs. However, as this book does attempt to be somewhat compiler/debugger agnostic, this is forgivable. From here, we dive into the real power of C++, Object Orientation.
Section III

From the beginning, this book treats Objects as an extension of the structure syntax taught previously (with the default of Public switched to Private). This, along with the classic Plans vs. Product description of the difference between a Class and an Object are quite clear and robust.

Again, this is a solid chapter, describing the details of getting a system of classes up and running, as well as some sample data structure implementations.

And then finally, the last section is a slightly less than 200 page description of the STL. This section is probably the book's weakest part, as it is just strong enough to give you a taste of what is available, but often not strong enough to grasp the details. It's a good start, but much more attention should have been made to this subject (potentially even at the cost of some of the wasted words on how a 'for' loop works). It makes a decent introduction for someone with very limited STL background, however, there is not enough depth to reach a strong level of understanding here.
Summary
Overall, this is a solid book for an existing programmer to pick up C++ concepts. A programmer with a strong knowledge of an existing procedural language (such as C) would have no trouble digesting the concepts of this book. Having said that, the poor typographical issues, and verbose wording often muddle an otherwise good book.

+1 Informative?!? (0)

Anonymous Coward | more than 10 years ago | (#8317298)

Are the mods higher than usual today? Jesus Christ, +1 Funny I could almost - almost accept, but Informative?!?

900 pages! (2, Funny)

Anonymous Coward | more than 10 years ago | (#8317152)

He should've used a little of that practical C++ for compression.

Guilt (3, Informative)

Anonymous Coward | more than 10 years ago | (#8317158)

Guilt free purchase link [powells.com] .

I concur (4, Informative)

gregarican (694358) | more than 10 years ago | (#8317159)

This book has been in my reference shelf for awhile now. Some areas are emphasized more than others -- arrays more than vectors, structs more than classes -- but overall it's a good companion.

In terms of going over bit manipulation, memory addresses, pointers, etc. it really goes into detail that I wouldn't expect for an entry-level reference. Then again it's so thorough it really isn't just an entry-level reference!

One question (1, Interesting)

Anonymous Coward | more than 10 years ago | (#8317193)

What other books are on your shelf?

Thank you,
Mr Blinky

Re:One question (1)

gregarican (694358) | more than 10 years ago | (#8317424)

Everything from Writing Hirigana to Proust to Kerouac to Linux to Cisco Administration. Jack of all trade master of none.

Another Question (0, Offtopic)

Anonymous Coward | more than 10 years ago | (#8317312)

What are you planning on having for supper?

Re:Another Question (0, Offtopic)

gregarican (694358) | more than 10 years ago | (#8317444)

Warmed over pizza with a Mexican beer or two. Next question please...

Third question (0, Offtopic)

Anonymous Coward | more than 10 years ago | (#8317370)

Do you like answering questions?

Re:Third question (0, Offtopic)

gregarican (694358) | more than 10 years ago | (#8317463)

Yes. It justifies my existence and provides me with an exaggerated sense of self-importance. Next question...

old!=obsolete (5, Insightful)

RLiegh (247921) | more than 10 years ago | (#8317185)

If you're talking about the specifics of a language to the point where the book you're reading is going to be obsolete after the next standards commitee meets--maybe you're reading the wrong book?

However, if the book you're reading concentrates on the principlas, instead of the individual bits and pieces, age shouldn't matter.

They still use the ritchie book after all, right?

Cease and Desist (2, Funny)

Sparky77 (633674) | more than 10 years ago | (#8317195)

Open Letter From Darl McBride:

The code examples in this book are part of the intellectual property owned by SCO. You must pay $650.00 per code example to receive a license that allows you to use our IP. Send check or money order, no cash please.

Thank You,

Darl (Big D)

Re:Cease and Desist (5, Funny)

Patrik_AKA_RedX (624423) | more than 10 years ago | (#8317326)

$650.00 per code example
Lets assume 350 code examples, that makes $227,500
A hit-man cost about $30,000. hmmm....
Sorry Darl McBride, it's not personaly, it's just economics.

Re:Cease and Desist (5, Funny)

SW6 (140530) | more than 10 years ago | (#8317494)

Lets assume 350 code examples, that makes $227,500
A hit-man cost about $30,000. hmmm....
Sorry Darl McBride, it's not personaly, it's just economics.

I clearly need to move to a nicer area. The going rate for a hit round here is less than a tenth of that. And the body would probably dissolve in the river...

While we're discussing "practical" books... (-1, Offtopic)

Yoda2 (522522) | more than 10 years ago | (#8317204)

from the last millenium , how about this little jewel [amazon.com] ?

Best learner's C++? (5, Informative)

FortKnox (169099) | more than 10 years ago | (#8317207)

(This book has been out for a few years; what books would make more sense today for a C++ learner's library?)

Best learner's C++ book has to be "Thinking in C++" by Bruce Eckel. I always touted his "Thinking in Java" as the premier book for the learning java developer, but his success started with TiC++. Best of all? Its available free electronically [bruceeckel.com] on his website (but I always went out and spent the $30 for the paperback version to support him).

If you pick up the book, you'll understand the language just a little more. He writes the book just how you'd like to learn, not like some math book that blandly gives out information in a manner that puts you to sleep. You can thank me later after reading it ;-)

Re:Best learner's C++? (1)

Thud457 (234763) | more than 10 years ago | (#8317525)

I always considered "Thinking in C++" to be an excellent book for experienced programmers. It's great for picking up C++ if you already know some other language(s). I wouldn't pick it for someone who was a complete neophyte.

I bought "Thinking in Java" because I expected it to be the same type of thoughful, insightful reading. Boy was I wrong. That book was a total waste. It really seemed that he was concerned with teaching basic programming rather than pointing out the crucial minutae of the language. (Hell, compare the sizes -- ~790pp vs more that 1000pp!) It really seems that Eckel had succumbed to the programming book industry groupthink that bigger is better.

C AND C++ ARE THE WORST LANGUAGES EVER DEVELOPED (-1, Troll)

Anonymous Coward | more than 10 years ago | (#8317208)

These two languages have caused more pain and suffering than any others. The average C/C++ programmer spends an hour a day pulling out hairs trying to find that memory leak or other weird problem. This is why most C/C++ work is done in India. No American can handle this torture.

Why you young whelp! (2, Funny)

Thud457 (234763) | more than 10 years ago | (#8317564)

There's no underestimating the contribution that the C language has made to computer science.

C invented the dangling pointer. And it put the buffer overflow on the map.

Kids these days. You have everything we worked hard for handed to you on a silver platter. You have no idea where these concepts even originated. PHAH!

On the subject of language (4, Informative)

sczimme (603413) | more than 10 years ago | (#8317212)


From the review:

Here we have a section which goes over everything from for loops to if conditionals while simultaneously using verbose, duplicitous language at every step.

Umm, you do know that duplicitous means "Given to or marked by deliberate deceptiveness in behavior or speech", right? Or did you mean redundant?

(The quoted definition was provided by http://www.dictionary.com.)

Re:On the subject of language (0)

Anonymous Coward | more than 10 years ago | (#8317413)

I don't know that he meant redundant as much as he was hoping to type duplicative.

Re:On the subject of language (2, Interesting)

kfg (145172) | more than 10 years ago | (#8317536)

Interesting. I read it to mean "simplified to the point where the author knowingly said things that weren't strictly true."

A common trait of quicky introductions.

KFG

The one I used (4, Informative)

proverbialcow (177020) | more than 10 years ago | (#8317231)

My C++ class used "Object-Oriented Programming Using C++" by Ira Pohl. The language was easy to understand, and it was aimed at people who'd done some coding, though it was necessarily a prerequisite. He somehow managed to make the subject accessible to newbies without condescending. A great book for beginners, and since I don't use C++ on a day-to-day basis, I find myself picking it up now and again.

Re:The one I used (1)

proverbialcow (177020) | more than 10 years ago | (#8317254)

Er, that should read:

though it was not necessarily a prerequisite

The one time I don't preview. Sheesh.

Only used copies at BN. (-1, Redundant)

telstar (236404) | more than 10 years ago | (#8317237)

Since only used copies exist at BN.com, you can pick it up for $21 at Amazon.com [amazon.com] .

Re:Only used copies at BN. (0)

Anonymous Coward | more than 10 years ago | (#8317607)

And, of course, you just had to sneak your little referral into there didn't you, kingdeal06?

The C++ Programming Language (2, Informative)

ArmorFiend (151674) | more than 10 years ago | (#8317240)

I am in the market for this type of book, however, the one I have my eye on is:

The C++ Programming Language (Special 3rd Edition) [amazon.com]
by Bjarne Stroustrup

A reference is too hard too read, but this looks like it might be the right level - hopefully pretty steep, but with some language design chit-chat thrown in. What do others think of this book? (And what languages have you learned, a VB for dummies alum isn't going to give the same advice as Guy Steele)

Re:The C++ Programming Language (1)

gregarican (694358) | more than 10 years ago | (#8317359)

I haven't personally read this one, but since the author is the originator of C++ I would think it would be the real deal. Personally I check out books from my public library system. That gives me some sort of a time-based goal to get through the thing before I have to return it. If I like the book and would like to keep it on hand as a reference I will scope out buying it.

The pet peeve that bugs me the most (and this Practical C++ book is included) are typos in the source code. Beginning programmers must pull their hair out trying to get code to compile that has such errors. Even books that I check out from the library get written in as I correct typos so other unfortunate souls won't run into the same pitfalls.

Re:The C++ Programming Language (2, Interesting)

johnjaydk (584895) | more than 10 years ago | (#8317421)

The Bjarne book is good. No doubt about that. It's a bit steep for someone with no previous exposure to OOP but it covers a lot of good stuff.

If you want the design rationale and evolution then I can recommend "The Design and Evolution of C++", also written by Bjarne. It's very helpfull not only to know how the language works but also why it was put together that way.

Re:The C++ Programming Language (0)

Anonymous Coward | more than 10 years ago | (#8317486)

The C++ programming language special edition kicks ass. A couple other good ones are C++ Primer 3rd edition and Accelerated C++. Search the web for Bjarne Stroustrups web page. It has a lot of C++ information, articles, interviews, etc.

Re:The C++ Programming Language (2, Informative)

Red Leader. (12916) | more than 10 years ago | (#8317512)

I'm just learning C++, basically as an advanced beginner programmer (I already know Perl pretty well). I have Stroustrup's book, as well as one called "Data Structures and Other Objects Using C++" by Michael Main & Walter Savitch. Even for a beginner, Stroustrup's presentation is FAR superior to the one in Main & Savitch. The explanation of points is clear and there is some design chit-chat that doesn't distract much at all from whatever the section its in is really discussing. It's maybe a little bit advanced for me, but I'm here to learn, right?

Stroustrup Book (2, Insightful)

Black-Man (198831) | more than 10 years ago | (#8317552)

It obviously is the bible... but I feel is more of a reference. I keep it on my bookshelf and use it often as a reference... there is no way you can sit down and read this like a text book. Way too dry.

Re:Stroustrup Book (1)

ArmorFiend (151674) | more than 10 years ago | (#8317608)

Heh, you're talking to a guy that read Common Lisp The Language [amazon.com] from cover to almost-cover. Yes, for a good 1.5 years I had no problem going to sleep, I'd just read about three pages and then fall asleep with the book on my chest. And after the 1.5 years, damn if I didn't know Common Lisp well. Every 300 pages or so he'd throw in a joke, usually about teenage mutant ninja turtles, just to see if you were still with him.

philosophical puzzlement (4, Funny)

jejones (115979) | more than 10 years ago | (#8317247)

Overall, this is a solid book for an existing programmer to pick up C++ concepts.

I'm not sure what books would be good for non-existing programmers.

Re:philosophical puzzlement (0)

Anonymous Coward | more than 10 years ago | (#8317291)

How about something more metaphysical?

C++ had its day (4, Insightful)

mugnyte (203225) | more than 10 years ago | (#8317258)


For many, this C derivative is still a daily living. Thats fine. It's powerful enough.

These days, most people approach C++ as a way to "write fast code" or they desired to get to a lower level of the machine. Or, they know C and want to learn all about OO programming. NO harm there either, although I question all these motives.

For the most part though, end-user applications have no need to run in C++. I know the typical exceptions are in gaming, image processing and system internals, but this is a small subset of commercial programming.

I think elementary programming skills can be taught in C++ (i've done it), but you have to peel away so much of the language, one might as well start from C anyway, and then explain OO, and then combine the two. However, the ancestry of the syntax hangs newbies too often.

These days, I think the same goals in being "practical" could be achieved with Java for the same (if not less) effort. Plus, one learns the concepts of Events, Interfaces and a more useful standard library.

I've cranked out over 100K of C++ (haha, not hard to do with low-density langs) but in the end, I wish it would have been a longer-lived system. Many of our framework pieces are now part of the standard Java libraries, and we would have saved quite a bit of time.

But I think it's time for new programmers to move on.

MOD PARENT UP - NOT TROLL (1)

qui_tollis (619713) | more than 10 years ago | (#8317467)

The review is of a book that is supposed to be suitable, not just for C++ experts, but also novices. Whether you agree with it or not, it's not out of place to state the opinion that C++ may not be an appropriate tool for much commercial programming.

learner's library (1)

falconed (645790) | more than 10 years ago | (#8317267)

This book has been out for a few years; what books would make more sense today for a C++ learner's library?

VB for dummies.

Unfortunately, I'm only half kidding. Seems like most budding programmers I meet nowadays just want to take the fast route to a nice salary and don't care to learn how to write code well. A low level langage like C++ is definitely not for them.

My favourite book is... (4, Informative)

xiox (66483) | more than 10 years ago | (#8317269)

An excellent book is Accelerated C++ - Practical programming by example (Koenig & Moo). It only weighs in at 340 pages, but really helps the beginner to use things like the STL. It doesn't start off teaching basic C, but leaves pointers out until much later, and concentrates on using the STL data types.

Re:My favourite book is... (0)

Anonymous Coward | more than 10 years ago | (#8317451)

I like it too. Wish there were more like this. And wish there was some book which could pick up where this one leaves off.

Re:My favourite book is... (1)

lelitsch (31136) | more than 10 years ago | (#8317455)

I agree for the most part. It's reasonably small, very clearly written and it is one of the few that doesn't start by teaching C and then telling you to forget most of what you know when they switch to C++.

The only thing that rubs me the wrong way is the stupid framing program in Chapter 1 and 2. I mean _come_ on_ writing a program to frame text output on an ASCII terminal? They should really be able to come up with a better example.

Re:My favourite book is... (3, Informative)

ibeleaf (751468) | more than 10 years ago | (#8317528)

If you're interested in Accelerated C++, make sure you get a newer revision -- lots of errata in earlier copies:

See http://www.acceleratedcpp.com/details/errata.html [acceleratedcpp.com] for a listing.

I just ordered this from Amazon.ca... hopefully their copy is newer!

Microsoft and Cthulu? (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#8317279)

http://support.microsoft.com/default.aspx?scid=kb; en-us;297830

Book recommendations here (-1)

BurKaZoiD (611246) | more than 10 years ago | (#8317327)

This book has been out for a few years; what books would make more sense today for a C++ learner's library?

Those who are too stupid to learn C++ usually pick up VB or PHP or Perl or some other noob crap like that.

practical? (4, Funny)

beforewisdom (729725) | more than 10 years ago | (#8317332)

Any IT book that is over 900 pages should NOT have the word "Practical" in its title. IMHO

Steve

any book with "C++" shouldn't have "practical" (0)

Anonymous Coward | more than 10 years ago | (#8317391)

The only successful C++ project was Mozilla.

This book has been out a few years.. (5, Funny)

osullish (586626) | more than 10 years ago | (#8317347)

Next review, punchcards in a nutshell (It being an O'Reilly book will have a T-Rex on the cover) :-)

anothe rone (0)

Anonymous Coward | more than 10 years ago | (#8317379)

Practical Abacus

Re:This book has been out a few years.. (1)

Perl-Pusher (555592) | more than 10 years ago | (#8317518)

Learn x86 Assembly in 10 minutes.

Out of stock in the stores - available online (2, Informative)

prostoalex (308614) | more than 10 years ago | (#8317352)

This book is available on Safari [oreilly.com] for subscribers. Cheapest subscriptions start at $10/month. If you're not a subscriber, you can still read the first few sentences of each chapter and section.

YEAAARGH! (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#8317355)

Today my candidacy may come to an end--but our campaign for change is not over.

I want to thank each and every person who has supported this campaign. Over the last year, you have reached out to neighbors, friends, family and colleagues--building one American at a time the greatest grassroots campaign presidential politics has ever seen. I will never forget the work and the heart that you put into our campaign.

In the coming weeks, we will be launching a new initiative to continue the campaign you helped begin. Please continue to come to www.deanforamerica.com for updates and news as our new initiative develops. There is much work still to be done, and today is not an end--it is just the beginning.

This Party and this country needs change, and you have already begun that process. I want you to think about how far we have come. The truth is: change is tough. There is enormous institutional pressure in our country against change. There is enormous institutional pressure in Washington against change, in the Democratic Party against change. Yet, you have already started to change the Party and together we have transformed this race. Along the way, we've engaged hundreds of thousands of new Americans in the political process, as witnessed by this year's record participation in the primaries and caucuses.

The fight that we began can and must continue. Although my candidacy for president may end today, the most important goal remains defeating George W. Bush in November, and I hope that you will join me in doing everything we can to support the Democrats this fall. From the earliest days of our campaign, I have said that the power to change Washington rests not in my hands, but in yours. Always remember, you have the power to take our country back.

Gov. Howard Dean M.D.

My favourite C++ introduction book (3, Informative)

3Daemon (577902) | more than 10 years ago | (#8317373)

I just had to read up on C++. I'm no expert programmer, but having experience from C and Java (in addition to having learnt the basics of Object-Oriented methodology) I wanted a book that didn't try too hard to explain everything from the bottom.

I found C++: The core language from O'Reilly incredibly useful in this respect. In its 200 pages, it might not cover every aspect of C++, but it will give you enough to go on so that you can start using the language. Being short and focused, it will give you a good understanding of the basics a lot faster than any larger book could, IMHO.

*pure* beginner book? (1)

errtega (710001) | more than 10 years ago | (#8317402)

every single book i pick up or have someone suggest always has a prerequisite of some programming background. i'd like a C++ book (or maybe a general programming book?) that does not assume i have ANY experience in programming. i'd like to learn from the very first step, instead of starting somewhere in the middle. sure i can pick up the basics while still starting from the middle, but i'd like to build a solid foundation first. anyone?

Re:*pure* beginner book? (1)

xoran99 (745620) | more than 10 years ago | (#8317582)

I once had QBasic for the Absolute Beginner, which was my first programming book, that seemed to be good for this kind of thing... IIRC, C for Dummies also was a good introduction for a nonprogrammer. I've never had a C++ book, so I can't recommend any.

Wrox (1, Insightful)

Anonymous Coward | more than 10 years ago | (#8317409)

I know these guys are usually MS weanies, but they have a couple of good C++ books by Ivor Horton.

I have "Beginning C++"
One day when I get a break from Java, I will actually start reading it.

The Bjourn Stroustrap stuff is excellent too. Should be since he is one of the leading proponents of OOP on C and helped define how C++ works.

I only know how to write "Straight" c and need to learn this stuff.

l8,
AC

Book sounds bad; read Accelerated C++ (4, Interesting)

afay (301708) | more than 10 years ago | (#8317415)

From this review, this book sounds horrible. I can't stand books that:

1.) Don't have a clear target audience (from the review it sounds too easy and too little details for a programmer and yet too hard for a complete beginner)

2.) Seem like the author was paid by the page. Really, even for a complete novice, a well written book can teach C++ in less than 300 pages.

Conclusion: Don't buy this book.

That said, I really like Accelerated C++ for a novice programmer. The authors obviously know their stuff and it's very clear and concise. Lot's of good (not pointless little toy programs) examples that are clearly explained. Also, an example is built throughout a chapter so you don't have to comprehend everything at once. Finally, and this is the best part, STL is used from the beginning. Why save the best part of C++ for the end?

Amazon link: Accelerated C++ [amazon.com]

C++ Should Be The Only Programming Language (-1)

rqqrtnb (753156) | more than 10 years ago | (#8317417)

Today's Software and IT industries are plagued by programming errors. While some of these errors are the result of illegal use of non-Microsoft software on rogue networks, the majority of problems stem from difficulties in mingling code of different programming languages. Standarization on the best-of-breed programming language, C++, would undoubtedly reduce errors in software.

In this post, I seek to dispel the myth that non-C++ languages are beneficial in proper Software Engineering. I outline how standardization on the C++ language can strengthen your corporation's bottom line. And I describe how to contact the men in Congress to have C++ use finally made legally mandatory.

C++, a programming language invented by Lucent's Bjarney Strupstrup in 1995, has been hailed as a God-send to Computer Science since its creation. Based on Richie Kerninghan's language "C+", C++ brought several previously-theoretical programming languages features to the mainstream:

Church-Rosser Compliance
Known as "multiple inheritance" in the programming world and as "being Church-Rosser" in academia, C++'s compliance to this IEEE standard immediately placed it head-and-shoulders above other languages. "Churrossity" allows programmers to use blocks of code, called "objects," in place of other blocks of code ("arrays".) The layman can think of this as "allowing 'new' code to 'run' old code." This advance has not been possible in previous logic-based languages such as Ada.

Multi-Byte Characters
C++ allowed use of "Beaster," a subset of Microsoft's COM ("Common Object Model") windowing layer. The Beaster system allows non-English-speakers such as the Welsh to use computing technology, as it could redirect the signals used to display non-English characters on a computer's monitor screen or laser printer. It is also useful in helping the blind, who speak a specialized subset of English called "ALS."

Pass-By-Text
A non-recursive pass-by-text mechanism existed in Kerninghan's C+, called "macro facility." But Strupstrup did Kerninghan one better with the "String Template Loader" variable passing mechanism, which allowed text to be passed to procedures at run-time. This sped up code execution times, as code could be compiled while the user was running the program. This eliminated speed loss caused by incompatibility from obselete computer chips (Motorola and ADM.)

The superiority of C++ over other languages should be obvious. But is switching to it from other languages possible in your corporation? Astute observers will note that the eco-terrorist group FSF produces a C++ compiler called "DJGPP." Under President Bush's War on Terror, any organization supporting a terrorist organization is recursively itself a terrorist organization.

Corporations needn't worry. Microsoft has its own C++ offering, "Visual Studio." As an added bonus, Microsoft Visual Studio is highly standards compliant. It features a visual programming interface, and several features not found elsewhere (such as a visual debugger and an AOL instant messanger client called "Windows Messaging".)

But these advantages can only be realized if code written in inferior languages can be kept from polluting the inter-web eco-space. When compilers for other languages are available, low-level managers are tempted to write code in them. Why? Often times, managers are brought up from the ranks of Software Engineers, and thus lack an Executive's sense for using the right tool for the job. When these managers write code in a jungled zoo of languages, code in one program is unable to interact with code from another program (churrossity.) Only by standardizing on C++ can all programs run together smoothly. Using C++ to eliminate software errors will jump-start the sagging technology industry. This will boost our economy as a whole, which in turn will help us to win the War on Terror.

The effort to legally mandate this has been going on for a while. But it needs your help. Even the smallest person, such as a reader of this site, can make a difference with his Congressman. Congressmen are kept highly versed in technical issues by lobbyists from Microsoft and Intel. But without strong grassroots input, the men of Congress and the Senate are powerless to heed the corporations' pleas.

Please, I urge you to visit the Congress [congress.com] and Whitehouse [whitehouse.com] Web sites to help bring this important movement to its fruition.

For templates there is one excellent book (3, Insightful)

Chuchi (50607) | more than 10 years ago | (#8317457)

C++ Templates The Complete Guide by Vandevoorde and Josuttis (ISBN 0-201-73484-2, Addison-Wesley) is an absolute must for anybody wishing to use templates (or discover new areas where to use templates).

The book talks about all the aspects of templates, has plenty of clear examples.

Apart from this I would not suggest the Stroustrup book for learning C++, but it is excellent as a reference manual.

Copy of a stupid article (2, Informative)

Animats (122034) | more than 10 years ago | (#8317483)

The above rant was copied from here. [adequacy.org]

Enough with C++/C/Java books! We need wider topics (5, Insightful)

Anonymous Coward | more than 10 years ago | (#8317487)

Isn't it time we start seeing reviews of books other than C/C++/Java/Perl/C#/HTML?

I am a hard core C++ person myself, but even I am fed up with the series of similar books on these PLs.

There are many other topics in programming that deserve better attention by the /. developer community. Examples from the top of my head:

Books on

- Code optimization techniques (both for C/C++ & assembly level and optimization for web programming and DB programming)

- Algorithms and data structures - this one will never go away whatever high level garbage collecting foolproof language/framework you end up using.

- Software design topics (design patterns and its relatives, UML, alternative paradigms such as extreme programming)

- Software project management topics ...

Come on people!

about the title (2, Funny)

Tumbleweed (3706) | more than 10 years ago | (#8317496)

'Practical' and 'C++'...something's not right there. :)

Here's my recommendation (0)

Anonymous Coward | more than 10 years ago | (#8317520)

If you are seriously considering programming in C++ you should definitely check out this book [amazon.com] .

suggestion (1)

b17bmbr (608864) | more than 10 years ago | (#8317521)

(This book has been out for a few years; what books would make more sense today for a C++ learner's library?)

Teach Yourself Java in 21 days

ducks

For todays C++ programmer? (0)

Anonymous Coward | more than 10 years ago | (#8317522)

"Introduction to Java" probably makes the most sense. Seriously, what few jobs in IT that seem to be out there right now all require knowledge of Java. Of course, C++ will still have its place for a long time to come for embedded devices, lower-level coding, etc.

Good Book. (1)

rendelven (687323) | more than 10 years ago | (#8317534)

I think it's a good book. It was the 2nd C++ book I bought and served me well. It did it's purpose, and for that I say it's worth the money I put into it. :) It did go into a lot of things my previous book hadn't even mentioned. I agree with the reviewer that the STL information was a little lacking.

Rob McGregor (1)

proverbialcow (177020) | more than 10 years ago | (#8317542)

I wonder if the guy who wrote this book is the same Rob McGregor who wrote all those bad Indiana Jones books in the 90's.

900 pages, 900 pages ... (1)

torpor (458) | more than 10 years ago | (#8317587)


personally, i often wonder, think, whether or not its useful to consider that by the time someone gets to writing 900 pages about a computer language, that language has become crap.

or, at least, crufted, which everyone knows is on its way to crap.

If you wish, Mod as Troll (1)

use_compress (627082) | more than 10 years ago | (#8317589)

Why do we need more books on Practical C++? The language itself is very practal and just about every intermediat book on the langauge emphasizes these aspects. What we really need is books that emphasize the practical aspects of languages that aren't used commonly in practice--- Practical Python, Practical Haskell, etc...

learn from the gaming industry (2, Interesting)

Tekmage (17375) | more than 10 years ago | (#8317605)

My personal favorite is C++ for Game Programmers [amazon.com] .

It's not a general-purpose book and not for the complete beginner, but it dives deeper into when and why to use different programming styles and structures.

Load More Comments
Slashdot Login

Need an Account?

Forgot your password?