tags:

views:

219

answers:

4

I have a Computer Science degree (long2 time ago) .. I do know Java OOP but i am now trying to pick up C++. I do have C and of course data structure using C or pascal.

I have started reading Bjarne Stroustrup book (The C++ Programming Language - Special Edition) but find it extremely difficult esp. some section which i don't have exposure such as Recursive Descent Parser (chapter 6).

In terms of the language i don't foresee i have problem but i have problem as mentioned cos' those topic are usually covered in a Master Degree program such as construction of compiler. I just bought a book called C++ primer (Stanley Lippman) which i heard it is a very good book for C++. Only setback is it's of course no match with the amount of information from the original C++ creator.

Related:

The Definitive C++ Book Guide and List

A: 

If you have a CS background, then you ought to be able to figure out what is going on in a parser between Bjarne's explanation, wikipedia, and google. I'm not familiar with Bjarne's specific illustration (is it for a language, or just an expression evaluator), but looking at an expression evaluator for infix notation should give you a leg up understanding a compiler parser/lexer. And now you have a bunch more keywords to google (for example, since you already know Java, look for "Java infix arithmetic expression evaluator".

Ben Voigt
Thanks but which would you recommend? Have you gone through these 2 books? I have never took any course on construction of compilers .. so it's a bit difficult for me. Of course i have data structure like stacks, linked list etc
yapkm01
I bought Stroustrup's book. A CS degree should equip you with everything you need to know about compiler design, but really it doesn't matter for this book. It's just an example of implementing a calculator to get your hands dirty with C++ coding. You can skip ahead and come back if and when you feel like giving it a go.But apart from that if you have a degree and you're not comfortable with parsing then you should really dig into that. It's never too late and you won't regret it. In fact, I think it's more important than learning C++. It's also easier than C++.
wilhelmtell
+1  A: 

If you have a CS degree then you should definitely be able to grasp Stroustrup's TCPL3e book. Yes, it's a big book with lots of meat, but it's all C++ language meat. Any other material is there just to motivate a point or put things in a real, concrete context.

C++ is a hard language. You can't read TCPL over a weekend, and you can't learn C++ over a weekend. If your dilemma is between a book that gives you the feeling you can learn C++ quickly and one that doesn't, then find the courage to admit one book is trying to sell while the other is facing you with the truth.

I'm not trying to scare you off. I'm saying that Bjarne Stroustrup's book is THE authoritative reference of the language. It's the best C++ book out there, even if it's thick and heavy. If you find a chapter dense then read it again. You'll just get better at grokking good technical texts. The book even has exercises! It doesn't get any better than that for learning!

wilhelmtell
+1  A: 

Well, I'm going to be the minority voice here, but in your situation I'd recommend Lippman's Primer book (4th ed., right? Big difference from 3rd, 2nd...)

Stroustrup's book has a lot of information, I don't any bone to pick there, but the presentation just doesn't do it for me. The index is weak, the formatting is very bland, and it seems to be hard to learn from (I didn't learn from it, but I've had a lot of staff try & fail using that book).

I usually give a copy of both books to new hires, and invariably Lippman is the one that's open on the desk. Maybe if you're writing a compiler, TCPL would be the only choice... I don't know. I think for a practical situation like yours, you can't go wrong w/ Lippman. Tons of information, great formatting, logical flow, nice examples, a very detailed & cross-referenced index, etc...

One thing I will say about TCPL that I've found extremely valuable, ironically, it's the stuff that's only indirectly about C++. Stuff like organizational adoption of the language, group dynamics, benefits of the language, some OOD stuff, etc... It's all relevant, but it's "bigger picture" stuff that Lippman's book doesn't offer. Not to mention Stroupstrup's insight into the history/development of the language, tales from the trenches, etc...

In your situation, if you can only get one, get Lippman; but really, get both, and choose the best parts of each.

Dan
Not spelling of Lippman -- 2 Ps, 1 N -- you might want to edit to help others' searches.
Dan
+1  A: 

C++ Primer is always the book I recommend to people to learn C++, so I think you should start with that. It's a great introduction to the language. Write some programs, then come back and read Stroustrup's book when you're ready to dive deeper. It really is the reference for the language, but it's not the first book I'd recommend.

Bill the Lizard