Okay so, It's my first time on C++. They say you can use C++ to make games, so I want to learn about C++. (remember I'm a big newbie) So my question is, how does C++ work? Like if you put the C++ code in notepad, save it, open it, will it work? I bet it won't. Do you have to use a program or something? Like how does mozilla open in a new window... If you don't get what I'm saying, how do I make the code work?

Okay so, It's my first time on C++. They say you can use C++ to make games, so I want to learn about C++. (remember I'm a big newbie) So my question is, how does C++ work? Like if you put the C++ code in notepad, save it, open it, will it work? I bet it won't. Do you have to use a program or something? Like how does mozilla open in a new window... If you don't get what I'm saying, how do I make the code work?

Hi,
I don't know anything about making games, but in order to get C++ code to work you need a compiler. A great one, and FREE, is Microsoft Visual Studio Express. It lacks some features that come with the full versions, but I think it is a great start.

As a beginner, you should find some online tutorials on how to write C++. You also need a compiler, preferably with an IDE. I recommend Dev-C++ bloodshed for beginers, but you should definitely upgrade once you know how. The subject is simply to vast to be answered in one post.

Try this one. Otherwise just google it. I'm sure you'll come up with something.

Here is a little more in-depth answer.
>So my question is, how does C++ work? Like if you put the C++ code in notepad, save it, open it, will it work? I bet it won't.
Well your right. Lets take it from the beginning. A program is a set of instructions the computer follows. Writting programs in these instructions is vary hard work for humans. So programming languages were developed. A programming language is a language that humans can understand, and can be converted into these instructions. They are converted using something called a compiler.
C++ is one of these programming languages. To make a program (on a basic level), you write your program and run it through the compiler to make your final program.
Remember when you start, your programs are going to be text based (i.e. no buttons, graphics or text boxes). So making something like a web browser will come latter on.
Remember if your going to learn how to program, USE GOOGLE when ever you run in to a problem. Good luck with your programming. :)

P.S: Yes you can use C++ to write games. If fact, isn't that the standard language to make games in? C++ alone can't make graphical games, but you can use a graphics api with C++ to do this. Don't worry about that for now if you are still learning C++.

As a beginner, you should find some online tutorials on how to write C++. You also need a compiler, preferably with an IDE. I recommend Dev-C++ bloodshed for beginers, but you should definitely upgrade once you know how. The subject is simply to vast to be answered in one post.

Try this one. Otherwise just google it. I'm sure you'll come up with something.

Isn't Dev-C++ dead? I suggest code::blocks
www.codeblocks.org
Also check:
http://www.cprogramming.com/
http://www.cpluplus.com/

commented: "Isn't Dev-C++ dead?" > Yup, it is. +22

I know that Dev-C++ is dead. I simply suggested it because it comes ready to go and isn't as complicated to set up as code::blocks (which i use myself).

Hiroshe- I was under the impression that Java was the main language for games. :?:

I know that Dev-C++ is dead. I simply suggested it because it comes ready to go and isn't as complicated to set up as code::blocks (which i use myself).

I wouldn't recommend Dev-C++ anymore since it's dead.
BTW, Code::Blocks isn't complicated, it just offers lots of features, and is very extendable, but only because of the loads of features it comes with wouldn't make it less suitable for beginners.
They could for example just use the features they know, compiling is as easy as in Dec-C++, and as far as I'm concerned, newbies often just get an IDE to be able to easily compile their application.
So I don't see any reason on why not to recommend it to beginners.

Hiroshe- I was under the impression that Java was the main language for games. :?:

I remember that Hiroshe said something like that. Well, I'm not qualified to say this, but I can say what I think.
What I think is that C++ is THE language for game programming.
(it's most used in Game Development)
Java is another language used for Game Development, but I think Java is much more used for online games, for example MMORPGs.
I also think C++ is more suitable for Game programming because it hasn't got a garbage collector. (yes you read that correct).
Imagine that right in the middle of your Java game, Garbage Collection takes place, that would probably result in a game lag.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.