| | |
I have a question about C++
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2009
Posts: 5
Reputation:
Solved Threads: 0
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?
•
•
Join Date: Jul 2009
Posts: 19
Reputation:
Solved Threads: 0
•
•
•
•
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?
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.
Try this one. Otherwise just google it. I'm sure you'll come up with something.
Last edited by waldchr; Jul 18th, 2009 at 6:57 pm.
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++.
>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++.
Last edited by Hiroshe; Jul 18th, 2009 at 7:58 pm.
"Sometimes, when I lie in bed at night and look up at the stars, I think to myself, "Man! I really need to fix that roof."-Jack Handy
•
•
•
•
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.
www.codeblocks.org
Also check:
http://www.cprogramming.com/
http://www.cpluplus.com/
•
•
•
•
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).
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.
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.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
![]() |
Similar Threads
- C command-line I/O question (C++)
- Apache Alias Directive... mod_alias question (Linux Servers and Apache)
- Completely new to C++ and have question about using char (C++)
- Question (Geeks' Lounge)
- question on cooling (Cases, Fans and Power Supplies)
- Context-sensitive grammar question :( (Computer Science)
- Welcome PC Mod Kingdom peeps! (Geeks' Lounge)
- Laptop LCD built into a car? (Monitors, Displays and Video Cards)
- Changing Network Configuration (*nix Software)
Other Threads in the C++ Forum
- Previous Thread: find the intersection of 2 strings, pls help in my code!!!!
- Next Thread: Correct Answers in Hangman
Views: 318 | Replies: 6
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll dynamic encryption error file forms fstream function functions game givemetehcodez google graph homeworkhelper iamthwee ifstream input int integer java lazy lib linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return sort stream string strings struct studio system template templates test text tree unix url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






