View Full Version : Learning C++
*.mp4 guy
10th February 2007, 20:47
I'm going to start learning to program C++, and I would like to know of good resources to help me in in this, this won't be part of a class or anything of that nature, and I don't know anyone who can help me learn to program so it has to be something I can use on my own.
I don't think this is offtopic here, since this forum has subforums dedicated to developement of programs for encoding/manipulating video, and the reason I'm learning C++ is to write avisynth plugins, since I'm not actually developing anything (yet), so I posted in general.
Any and all advice is welcome.
jeffy
10th February 2007, 21:17
Google is your friend :D
http://www.google.com/search?hl=en&q=c%2B%2B&btnG=Google+Search
C++ Language Tutorial
http://www.cplusplus.com/doc/tutorial/
Includes recommended literature
http://en.wikipedia.org/wiki/C++
I would like to point out ONE link:
Bruce Eckel's Free Electronic Books
http://www.mindviewinc.com/
*.mp4 guy
10th February 2007, 22:48
... I should have thought of that, google is the answer to every question :D. Thanks for the links.
neuron2
11th February 2007, 01:59
I suggest that you get a good foundation in C first. I learned C from Kernighan and Ritchie:
http://www.amazon.com/C-Programming-Language-2nd/dp/0131103628
One good review:
"This book (widely known as K&R, after the authors' initials) has for over twenty years been the best way to learn C. When I got this book in 1980, I had access to a Unix system and worked through much of the tutorial material in it. On the way I learnt a great deal, not just about C, but about good programming style, code reuse, the value of clear comments--in short, I was introduced to the skill set of an experienced computer professional.
The book was a trendsetter in several ways. For example, the very first exercise given is to print "hello, world"; this is now seen as the first exercise in innumerable other, more recent books, many of which may not realize that they are borrowing from K&R. The rest of chapter 1 (there's a chapter 0, an introduction; another geek-cool change which has been widely copied) is a tutorial that takes you through assignment statements, data types, if/else, for, while, printf, function definitions, arrays, and variable scoping, in less than 30 pages. If you work your way through the embedded exercises you'll have written utilities to strip tabs, reverse input by lines, strip trailing whitespace from input, and several others. This is much more challenging than most tutorials, but the effect on the student is that you feel you are being treated as an equal. The book doesn't talk down to you; it gives you accurate and concise answers. It's written for programmers, in other words.
The next few chapters go back over the elements of C in more detail, and should also be treated as a tutorial. Going through this material religiously will be far more valuable than any college class could possibly be.
There is a reference section at the back, which is good to have. But the real value of this book is in the tutorial approach: it is a rare pleasure in the computing field to find a book that is simultaneously clear, stimulating and informative."
After you have learned C, then you can step up to C++ relatively easily.
*.mp4 guy
11th February 2007, 02:46
Thanks for the info, that definately is a good book to have, I'll order it as soon as I can. Just one question, how much more complex is C++ compared to C?
neuron2
11th February 2007, 02:59
It's hard to quantify that.
You need to learn the object paradigm and then how it is represented in C++ syntax.
Lots of "C++" code is really just using C paradigms. E.g., most of DGMPGDec.
squid_80
11th February 2007, 07:27
I use the K & R book too. Paid a lot more for it than Amazon's price, even with a textbook discount - $85AU. That was 5 years ago though.
I didn't find C++ much more complex until you start getting into stuff like templates and run-time checks. Thankfully they're not often used in avisynth plugins or codecs.
jeffy
11th February 2007, 21:56
I suggest that you get a good foundation in C first. I learned C from Kernighan and Ritchie:
http://www.amazon.com/C-Programming-Language-2nd/dp/0131103628
One good review:
"This book (widely known as K&R, ...
I think it might be good to point out the errata for this edition:
http://cm.bell-labs.com/cm/cs/cbook/2ediffs.html
*.mp4 guy
13th February 2007, 05:59
Thanks for the info, I would have had some trouble if I programmed using bad information.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.