PDA

View Full Version : [SOLVED] Switching from python to C++



gameguy
September 16th, 2010, 07:29 AM
I know quite a bit about Python and want to learn C++. I have started a book but have found that some things it goes over too much, things in python like for loops, and others not enough, like arrays (I know about lists but arrays seem hard to operate on). Basically, I was wondering if there was any tutorials for learning C++ assuming knowledge of another programming language (not nessecarily python, but preferably).

SledgeHammer_999
September 16th, 2010, 12:32 PM
I highly recommend to read this tutorial (http://www.cplusplus.com/doc/tutorial/). It just assumes that you know the basics of programming, which I assume you do.

gameguy
September 16th, 2010, 12:57 PM
That looks really useful. Thanks

gameguy
September 16th, 2010, 12:58 PM
How do I change this to solved?
Or should I just leave it?

xnerdx
September 16th, 2010, 04:53 PM
C++ Without Fear and Practical C++ Programming are both wonderful C++ books. As well the GNU programming tutorial is very useful for learning C (Which is a good stepping stone for learning C++ even if you already know Python) http://www.crasseux.com/books/ctutorial/
Note: Arrays aren't very difficult, think of a bunch of boxes with a number n on them (starting at 0). An array lets you put something into each box by calling the box like so box[n]. The following is an example of an using an array compared to doing the same thing without an array:


//No array
int a,b,c,d,e,f,g,h,i;
//With array
int foo[9];

To set a value to one of the boxes in the array you just write:


foo[0] = 82;

Arrays work just like normal variables but they create a great amount of variables all stored together under one name and accessed by their index number.

SledgeHammer_999
September 16th, 2010, 05:24 PM
How do I change this to solved?
Or should I just leave it?

At the top of your first post on the right there is a drop down menu called "Thread Tools". Press it and choose "mark as solved".

gameguy
September 16th, 2010, 10:33 PM
file:///C:/Users/Matt/AppData/Local/Temp/moz-screenshot.pngI only see "show printable version".

xnerdx
September 17th, 2010, 06:14 PM
Looks like you weren't logged in when you tried to mark the thread as solved. You have to be logged in.

gameguy
September 17th, 2010, 09:09 PM
Thanks