943,686 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 631
  • C++ RSS
Jul 18th, 2009
0

I have a question about C++

Expand Post »
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?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Denxerator is offline Offline
8 posts
since Jul 2009
Jul 18th, 2009
0

Re: I have a question about C++

Click to Expand / Collapse  Quote originally posted by Denxerator ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
seakayaker is offline Offline
19 posts
since Jul 2009
Jul 18th, 2009
0

Re: I have a question about 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.
Last edited by waldchr; Jul 18th, 2009 at 6:57 pm.
Reputation Points: 8
Solved Threads: 6
Junior Poster in Training
waldchr is offline Offline
90 posts
since Jun 2008
Jul 18th, 2009
0

Re: I have a question about C++

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++.
Last edited by Hiroshe; Jul 18th, 2009 at 7:58 pm.
Reputation Points: 431
Solved Threads: 17
Posting Whiz in Training
Hiroshe is offline Offline
255 posts
since Jun 2008
Jul 18th, 2009
1

Re: I have a question about C++

Click to Expand / Collapse  Quote originally posted by waldchr ...
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/
Reputation Points: 462
Solved Threads: 392
Senior Poster
evstevemd is offline Offline
3,681 posts
since Jun 2007
Jul 20th, 2009
0

Re: I have a question about C++

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.
Reputation Points: 8
Solved Threads: 6
Junior Poster in Training
waldchr is offline Offline
90 posts
since Jun 2008
Jul 20th, 2009
0

Re: I have a question about C++

Click to Expand / Collapse  Quote originally posted by waldchr ...
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.

Click to Expand / Collapse  Quote originally posted by waldchr ...
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.
Reputation Points: 2125
Solved Threads: 243
Postaholic
tux4life is offline Offline
2,105 posts
since Feb 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: find the intersection of 2 strings, pls help in my code!!!!
Next Thread in C++ Forum Timeline: Correct Answers in Hangman





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC