I’m an intermediate-level programmer and I’ve been writing the code for several years in PHP, later C#.
Now I want to learn some C++ through reading some short(let’s say up to 2000 lines) well-written non-gui program sources.
Have you got any ideas where so find something like that?
I’d prefer some kind of networking tools… I just downloaded netcat but it’s 1) written in C 2) too complicated for me
Thanks
I’d recommend Effective C++ #3 by Scott Meyers – it’s a pretty cheap textbook, and it starts with some semi-advanced topics (at least with regard to design).
The reason I think it would be good for you is that I came from a C# background primarily, and I know that while you’ll be decent with object oriented design (like I was), you’ll probably get hit by a lot of the gotchas in C++ still.
The book does a very good job of showing you some intermediate level examples using arrays, pointer tricks, and newer STL/TR1 components. It’ll teach you all the finnicky const correctness rules, and it’ll basically cover all the areas of confusion for you.
It’s not a complete program, but I don’t think you’ll learn anything from a complete program. People tend to do things wrong (even professionals) or according to their own whims. Something like this will show you enough code to get you stably on your legs, and will, more importantly, teach you why the code is right and what the alternatives are. This will help you remember it vividly 🙂