I'm new, how do I code? :3

Hello Everyone,

I'm just going to tell you that I am 14 years old and have never coded in my life. I want to learn but I don't know what's best way. I've heard C++ is a good place to start. I have downloaded an IDE called Codeblocks...was that a good one to download? Once it has downloaded where should I start? Is there a big guide of some sort? I am a COMPLETE BEGINNER, I have absolutely no idea. So is there an online guide for dummies wanting to learn C++ or do I just ask every single little question that I have, here on the forum? Please don't abuse me or be mean just because I'm a beginner. I'm just trying to learn what most of you already know :)
Last edited on
This site has a pretty decent tutorial (IMO) for learning the features of C++.
http://cplusplus.com/doc/tutorial/

Also, you may want to move this to the Beginners section.
OK thank-you, I'll check that link out.

So sorry, didn't even see the beginners section >.<

Can I move it there or can only admins?
OK. Code::Blocks has downloaded. Where should I start? Should I first read through everything given in that link? or is there some tutorial built into Code::Blocks?
Good to see new people learning C++
Code::Blocks site has user manual in PDF format for download as well as HTML for online viewing. http://www.codeblocks.org/docs/main_codeblocks_en.html
But that is for using Code::Blocks.

I suggest you read the tutorial as Zhuge suggested and get the basic concepts cleared first, then open Code::Blocks and type in a simple program there.

Also, you will need a compiler for compiling the source code you write.
Which compiler to use largely depends on the Operating System you use.
In addition to this site, you can also use http://www.xoax.net/ since they have video tutorials. Start with the basic console c++, and once you're comfortable with that, move on to the more advanced libraries/toolkits.
Thanks :) Not to doubt you codewalker but I was lead to believe that IDE's have compilers built into them? If not, I use Windows 7 Home Premium.
I've been watching Buckys C++ Programming Tutorials on YouTube! They're extremely helpful, I think that's how I'm going to learn the basics.

I've already written my first program!!!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>

using namespace std;

int main()
{
    int a;
    int b;
    int sum;

    cout << "Enter a number. \n";
    cin >> a;

    cout << "Enter another number \n";
    cin >> b;

    sum = a + b;
    cout << "The sum of those numbers is: " << sum << endl;

    return 0;
}
Good to see you're progressing Seandotbat.

Yes, usually an IDE will come with at least one compiler but the compiler you use with your IDE is not a given and can be changed. If you got the Code::Blocks with MinGW version, you now have the GCC compiler chosen in your IDE.

For C++ resources, I'll second the already mentioned tutorials on this site, I've found them extremely useful personally. You can find useful material in many places though.

Also, once you become a bit more used to the basic concepts, I've found in the past that it's often constructive to cross-reference learning resources -- maybe study two seperate sources that describe the same concept you're currently learning. You come to notice different tendencies and preferences characterizing each programmer, and it helps you understand the difference between the concept itself and the programmer's own choice of implementation -- it also encourages critical thinking on using the C++ language and on how to write your own code using the said concept. So I recommend you study using a resource you find helpful, like you do now using Buckys video tutorials, and then once you become more accustomed with the basics keep looking around and compare descriptions and implementations of those same concepts with what you already know and understand.

Last edited on
Hi Seandotbat , Welcome to Cpluplus !

Good work so far - well done.

Can you change your program so that it asks for 10 numbers and prints the sum without writing lots of extra code? Maybe surprisingly, the code should be shorter than it is now. You will need research the concept of a for loop. Look in the reference section - the top left of this page.

Once you can do that, change it again so that it also works out the average - you will need to change the type of the variables to double.

I am sure there a lots of people wiling to help.
Just for clarity, the concept of a C++ 'for' loop is referred to in the 'Documentation' section in the top left (which is the same as the aforementioned tutorials of this site). The 'reference' section describes the content of the standard C++ library.
Topic archived. No new replies allowed.