What exactly can I use C++ for?

Pages: 12
ShadowTek,

No it may not be that bad to you, but a true begginer wont even know how to output to the console.

If I could give one more small piece of advice, check out the documentation from this site, it is very helpful.

Also type this into Dev:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <iostream>
 //This includes what is called a header file.  It has pre-written code for you to use.    
//Each header file servers a diffrent purpose.  This one allows input/output (among other things)
//Any line that starts with a double slash (//) is a comment and the compiler will not take it as code

using namespace std;

int main()
{
cout << "Hello World, This is my first C++ program!!\n";
//The above line is an output command.  It tells the computer that at this line you want it to output THIS.

int x; // This is a variable it is defined as an integer (or a number for easier terms) and it has no value YET!!

cout << "Enter a number: "; //output this text
cin >> x; //This is an input command this is read like this: When a value is passed to the program, assign that value to x.

cout << "\nYou entered for the value of x: " << x;

cin >> x; //This will just keep the window open, so you can see the result

return 0;
}


To everyone that may jump on me for the last cin, it is merely because I don't have time to write in a proper pause command!!
Last edited on
Hmm, I'm 13, and I know PHP, some BASIC(easy, by name lolz), learning C++(half through the book already, and only been reading it for like 6 months, I am a slow reader, for books, and its only 1567 pages!), HTML, some CSS, and I think thats about it...oh, and some javascript!
ShadowTek,

No it may not be that bad to you, but a true begginer wont even know how to output to the console.

There are plenty of very young people that make WC3 triggers. I'm well familiar with that fact due to my spending a lot of time in WC3 map making forums answering questions.

Kids who are motivated can surprise you with what they can understand. It just seems that the biggest problem is their impatience. A lot of kids will ask you to make a trigger for them, without really putting much if any effort into attempting to learn how to do it themselves. Of course, that all depends on whether you are motivated to actually learn or to simply play a new game.
I forgot to download the complier...well thanks everyone!

The only things I know about C++ is
1
2
3
/*This
for comments*/
//This 

and
cout << "Hi!;
that..
Go through the tutorial on this site. Start at the top and work your way down.
I would agree, that is defiantly the best way to start!!!
Okay I'm downloading it right now I hope this works ^_^
Uhm I strongly recommend against the JASS thing of WC 3: it's full of "bugs" (well not direct bugs, but strange nesting functions etc doesn't really work out well)..

If anything I would advice you to start learning JAVA or game maker (learned both when I was a bit older than you - soon to turn 20 now).
I'm at the very start of learning C++ now, though I can literary dream game maker (I've written everything from an A* pathfinding algorithm to a 3d-emulation using only 2d polygons). The main problem with C++ I experience is that there's so much to it: sure cout and cin are easy, but what about objects? And the countless number of constructors, destructors assignment operator overloading, template classes and the massive stl make it a very hard language to master!

As for starting to learn C++: I recommended getting some books.. I own myself a copy of "C++ for dummies" as well as a college book. C++ for dummies is indeed very comprehensive: a bit too much I think. (It goes for example into great detail detail about when a function is compiled and how, yet for a beginner you'll probably "coudln't care less"). It lacks a lot of "excersizes": so I would also recommend getting a book which has excersizes so you can test yourself!

sure cout and cin are easy, but what about objects? And the countless number of constructors, destructors assignment operator overloading, template classes and the massive stl make it a very hard language to master!


You are correct. But then add the fact that you have to design everything in your head to make sure it's actually going to work. This gets exponentially harder with game development, then exponentially harder again with multi-thread/multi-process.
Uhm I strongly recommend against the JASS thing of WC 3: it's full of "bugs" (well not direct bugs, but strange nesting functions etc doesn't really work out well)..

I have run into a handful of stupid problems with unit functions and whatnot, but I can't recall ever really having any problems with nesting logic. I don't see anything that would support 'strongly recommending' avoiding its use.
Topic archived. No new replies allowed.
Pages: 12