PDA

View Full Version : Suggestions for learning C++


bandini
02-13-2007, 06:54 AM
Hi,

As a side project, I'm interested in developing a plug-in for Cinema 4D. I don't have any scripting experience, and I'm hoping some of you can point me toward some good books on learning C++ from the ground up. I know there are a lot of books out there, and the recommendations of the people on this board would mean a lot to me.

I have downloaded the current SDK for version 10, and I have the current version of XCode (I'm on a Mac). Besides those two things (and a lot of time), are there any other tools I need?

Thanks!

Kuroyume0161
02-13-2007, 07:28 AM
That's a tough one. C++ is not scripting - it's a full compiled-linked programming language - Cinema 4D is written in C++ (and probably some assembly). Just learning to program takes time - learning to program a full language, OOP (Object-Oriented Programming) nonetheless, could take some time (six months to get to a good beginner level for actually doing your own coding).

Start with a copy of Bjarne Stroustrup's "The C++ Programming Language" - whatever Edition is latest. He's the granddaddy of C++. This will be mainly a reference, but the meat of the language is laid out there.

Then find a good beginner's book on C++ Programming. Since you are on a Mac - avoid anything that has to do with MFC (Microsoft Foundation Classes). Can't really recommend a book as there are billions of them. Go to Amazon.com and get to the proper section and widdle away by user ratings and user reviews.

Check out http://www.cuj.com/ as mentioned in the C4D C++ SDK docs.

Check for MacOSX developer forums such as: http://forums.macosxhints.com/
http://macosx.com/forums/
and of course Apple's Developer information

Check out GameDev.net, Gamasutra.com, and an oldie but goodie FlipCode.com. These are more gaming programming sites, but many topics are covered from maths, algorithms, languages, 3D CG and on and on. Indispensible.

Instead of investing hundreds of dollars on books, keep the books to a minimum and use the vast and free and vast resources of the internet. I've learned almost everything about C++ (that I hadn't learned otherwise) on the web - but I came into this from a C/Java programming background.

*Apple Computer
*MacOSX
*XCode 2.4.1
*SDK for R10 (comes with R10 or with the Demo)
*SDK Docs for R10

That's just about it. Read the "Migration to XCode" section in the SDK Docs - that's not a suggestion, that is an order! There is critical information there.

Once all the installs and preparations are complete, you'll want to start by compiling the cinema4dsdk in the R10 'plugins' folder. Find the cinema4dsdk.xcodeproj and double-click to launch XCode and load this project. Select a Target and hit "Build". If everything goes well, you'll have a "Succeeded" at the bottom right and two things would have been accomplished - a plugin with examples and a compiled api lib (lib_release_api.a and lib_debug_api.a, iirc).

Use the example 'source' in the cinema4dsdk folder as a starting point for your own plugins. This will make it easier to get a handle on how the SDK works.

Hope that helps somewhat,

Robert

bandini
02-13-2007, 04:34 PM
Thank you!

That is very good information, there.

Yes, I am aware that learning how to do this is a **long-term project**. Six months to get a handle on the basics sounds very reasonable to me. In fact, I'd be very happy if I could get there in six months.

Thanks for the suggestions! If I find a good book, I'll post some info about it here.

Darter
02-15-2007, 07:06 PM
Then find a good beginner's book on C++ Programming. Since you are on a Mac - avoid anything that has to do with MFC (Microsoft Foundation Classes). Can't really recommend a book as there are billions of them. Go to Amazon.com and get to the proper section and widdle away by user ratings and user reviews.


I can recommend Beginning C++ Game Programming by Michael Dawson, which I found good for clearly explaining the basics without knowledge gaps.

Another excellent resource is the book Thinking in C++ by Bruce Eckel. It can be downloaded for free from http://mindview.net.

CGTalk Moderation
02-15-2007, 07:06 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.