C++ for a thirteen year old

Pages: 123... 5
Hi!
So, I am a thirteen year old, who wishes to try out C++. I entered the world of programming when I was 10 by learning about Python. Next I moved to Java, which I stuck with for a year. Now, I wish to actually begin programming some basic yet fun (for me to program) games. So I decided to try out C++. I have ordered this book - http://www.amazon.com/dp/0321714113 and it should be arriving in a few days. It has about a thousand pages, so it should keep me occupied for a few months. Do you have any advice for me? Anything I should learn simultaneously or after the book?

Regards,
GreatBlitz.
Anything I should learn simultaneously or after the book?

You'll know in the course of reading the book or after you've finished.

Good luck with programming.
> Do you have any advice for me?

As you read the book, take the time to do all the programming exercises at the end of each section, before you move on to the next section.
Have questions? Ask them here or on stackoverflow.com. Didn't understand something in the book? Watch thenewboston's youtube tutorials instead!
Anything I should learn simultaneously or after the book?

You'll know in the course of reading the book or after you've finished.

Good luck with programming.


> Do you have any advice for me?

As you read the book, take the time to do all the programming exercises at the end of each section, before you move on to the next section.



Have questions? Ask them here or on stackoverflow.com. Didn't understand something in the book? Watch thenewboston's youtube tutorials instead!


Just got my book. Now, I guess I'll decide what compiler to use. Book hasn't really said anything about compilers, just "To use Microsoft compilers, do xyz".
I guess I'll decide what compiler to use. Book hasn't really said anything about compilers, just "To use Microsoft compilers, do xyz".


I'd recommend using MS Visual Studio 2013 as IDE (comes with a compiler). Its the most used one when it comes to c++.

Here is a link for the download - http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx

Choose the "Express 2013 for Windows Desktop"

Other than that, CodeBlocks is always good!
Last edited on
Hi,

Sorry, TarikNeaj , I mean the following in the most constructive way - I hope you don't take offence :+)

I would recommend not using Visual Studio, the main problem being being that one is forced to use the MS compiler it comes with - which is not good IMO and many others might agree with me.

Most of the other IDE's allow one to choose which compiler to use, and the best free compiler (not counting the proprietary ones ) seems to be clang++ which is part of llvm.

Some other good IDE's might include QtCreator, CodeBlocks, Eclipse.

Actually IMO, if you really want to get into all kinds of programming, then you could get a version of Linux (Fedora or Ubuntu say). I mention this because Linux comes with tons of free stuff, there is a whole lifetime of learning available with Linux.

Hope all is well :+)
@TheIdeasMan

No offense taken at all. I actually did not know about this. I've been considering getting ubuntu for the past month but never really got around to it. Thanks for the info, I'll check it out :)
Ok, cool.

I meant the advice for the OP as well - it would be awesome if we managed to convince the OP (13yo) to start using Linux so early on.

:+D
It's sure as hell better to start when you're as young as 13, than when you are as old and wrinkly as you and I are @TheIdeasMan.
Last edited on
Actually the Microsoft compiler that ships with Visual Studio 2013 is a good C++ compiler; and their implementation of the standard C++library is very good.

The LLVM compiler (clang++) can be used with Visual Studio 2013: http://llvm.org/builds/

Good advice from STL:
I recommend that anyone who is learning Standard C++ and who uses Windows for a primary development environment should use two compilers: the most modern version of Microsoft Visual C++ (currently 2013) and the most modern version of GCC, the GNU Compiler Collection. Using two compilers that conform closely to the Standard subjects your code to more strenuous trials than using a single compiler would.
- http://nuwen.net/mingw.html
I guess I'll decide what compiler to use. Book hasn't really said anything about compilers, just "To use Microsoft compilers, do xyz".


I'd recommend using MS Visual Studio 2013 as IDE (comes with a compiler). Its the most used one when it comes to c++.

Here is a link for the download - http://www.visualstudio.com/en-us/products/visual-studio-express-vs.aspx

Choose the "Express 2013 for Windows Desktop"

Other than that, CodeBlocks is always good!



Hi,

Sorry, TarikNeaj , I mean the following in the most constructive way - I hope you don't take offence :+)

I would recommend not using Visual Studio, the main problem being being that one is forced to use the MS compiler it comes with - which is not good IMO and many others might agree with me.

Most of the other IDE's allow one to choose which compiler to use, and the best free compiler (not counting the proprietary ones ) seems to be clang++ which is part of llvm.

Some other good IDE's might include QtCreator, CodeBlocks, Eclipse.

Actually IMO, if you really want to get into all kinds of programming, then you could get a version of Linux (Fedora or Ubuntu say). I mention this because Linux comes with tons of free stuff, there is a whole lifetime of learning available with Linux.

Hope all is well :+)




@TheIdeasMan

No offense taken at all. I actually did not know about this. I've been considering getting ubuntu for the past month but never really got around to it. Thanks for the info, I'll check it out :)



Ok, cool.

I meant the advice for the OP as well - it would be awesome if we managed to convince the OP (13yo) to start using Linux so early on.

:+D



It's sure as hell better to start when you're as young as 13, than when you are as old and wrinkly as you and I are @TheIdeasMan.


Right, I used Code::Blocks as IDE with MinGW as compiler.

As for the Linux thing, thanks so much for the advice! :D . Sadly, I'm only 13, and have never done something "OS/System modifying" thingy, specially something as fearful as a change of OS. This is the only computer we have, so messing this up would proooobably lead to some dire consequences. Maybe, a few months down the line, I could setup a partition on my C Drive and dual boot ubuntu from there.
Try a book by John Smiley "Learn to Program with C++" very beginner friendly book, you can learn all the basics with it.
Does Linux have an intellisense feature?

Also, I would suggest starting with Microsoft Visual Studios. I started in PuTTy (Linux environment) and almost quit programming, found VS and loved it.
Last edited on
I agree with @shamieh

Linux can be very confusing for beginners. Start off with something relatively easy. Codeblocks or Visual studios.
hi,

Sadly, I'm only 13, and have never done something "OS/System modifying" thingy, specially something as fearful as a change of OS.


These days you can fit an OS onto a USB memory stick - give that a go - no danger there :+) After that see if you can save up and get hold of another hard drive - it doesn't need to be that big (20Gb say) - you could get a second hand one?

So if you are using Codeblocks on windows - I am sure that is fine. The main reason I mentioned Linux, is because there are heaps of programming stuff of all kinds available - all for free. There are heaps of development one can access through Linux, such as Enterprise level Database (PostgreSQL, MySQL). Another thing is a lot of (maybe not true for all of them) the windows IDE's seem to be only able to use MinGW compiler, whereas with the Linux IDE's you can choose which ever compiler you like.

shamieh wrote:
Does Linux have an intellisense feature?

Also, I would suggest starting with Microsoft Visual Studios. I started in PuTTy (Linux environment) and almost quit programming, found VS and loved it.


It's not that Linux has Intellisense, but the editor in the IDE does. I have 4 IDE's installed on Linux - they all have the same thing as Intellisense. I guess the main idea is to get away from that awful MS compiler .

I can understand that doing everything form the shell, is much harder. But I am talking about a full GUI IDE.

Btw, I have used VS 2013 Express, and really didn't like it at all.

I haven't used VS Ultimate, which probably has some things that KDevelop doesn't have,but the down sides are: The MS compiler, and having to buy it - how much these days > $1000 ? So why not have some with full functionality, and not have to pay for it?

TarikNeaj wrote:
Linux can be very confusing for beginners. Start off with something relatively easy. Codeblocks or Visual studios.


But once the IDE is installed, using it is just the same as on any other OS.

One of the IDE's I have is called KDevelop. It is a very mature application and can be used to develop with 61 different source languages such as C++, D, Eiffel, F, Fortran, Java, Haskell etc, plus dozens of scripting languages, assembler, SQL etc. You name it, the editor can operate in that mode - one still has to have the relevant compiler installed. It can have Qt and sfml integrated into it, and various types of version control, such as Git.



I hope all this has cleared things up a bit.

Edit:

http://qt-project.org/
https://www.kdevelop.org/

https://getfedora.org/
http://www.ubuntu.com/
Last edited on
> Right, I used Code::Blocks as IDE with MinGW as compiler.

Yes; now you have a reasonably good and current C++ compiler; and you have have a good book to get you started. You have everything that is needed for you to actually start learning C++. As far as learning C++ is concerned, everything else is almost completely irrelevant.

There is only one standard C++; it is the same no matter what OS you use and what IDE you use or for that matter whether you use an IDE at all. You can learn C++ equally well with Code::Blocks and MinGW or with Visual Studio on Windows; with vim and clang++ on BSD; with XCode on OS X; with <fill in the name of what ever IDE someone is peddling> with g++ on Linux ...

Spend your time fruitfully in learning C++; shun getting involved in these utterly puerile arguments about which IDE on which platform is 'better'.
Hi JLBorges,

I understand what you are saying, but could I point out that I mentioned changing to a different IDE, because someone recommended using VS 2013 Express. Now I have that compiler on my work laptop, and quite frankly I found it to be a pain. It is missing constexpr and auto amongst other things. So why not mention a fully compliant compiler like clang++? OK the OP has CodeBlocks, which is good, but i didn't want him to think that VS was better somehow.

I mentioned Linux because of the sheer volume of pretty good programming related stuff available for free. I mean exposure to a Unix like shell, is gold all on it's own IMO.

I have mentioned an idea of what is out there: whether anyone acts on that idea now or later - it doesn't matter, but at least they have heard of it.

Any way I hope all is well at your end, and I sincerely thank you for all the help you have given so much of - I always look forward to learning something more from your posts.

Regards :+)
Right, looks like I have faced my first problem. I really don't understand much about memory, and as a result I didn't understand a certain section of the pages I will link you to in a moment.

http://flylib.com/books/en/2.674.1.20/1/

The parts that I didn't understand:
Paragraph 2 of Section 2.1 - Primitive Built-in Types (I understood para 1)
Table 2.1. C++: Arithmetic Types
2.1.1. Integral Types
Machine-Level Representation of The Built-in Types

Could I please get a section wise explanation? It would really be appreciated :) .
Search for free C++ PDF files, and C++ cheat sheets. It's always nice to have more references. Tape the cheat sheet to the side of your computer. (If mom and dad say it's okay)

Never be afraid to ask a question in the forums.

There are always more than one way to do something in C++. While learning, you may not always know the best method, so ask advice find two or more ways to accomplish your task, then go for it and most important, never let anyone tell you the project you want to do is stupid. Don't listen to them. If you think it's cool, someone else will too.
Pages: 123... 5