Toribash
Well, return 0; is sending a return value to the operating system. I guess for the purposes of a little status thingy it would work, but you can't return a value unless you have declared a function ( main() ). What endl; does, is signifies that you are finished with that aesthetic line of coding.
-----
for example

int main ()

{

cout<< "WHY IS THIS SO DIFFICULT HNNNNG";
cout << "PLEASE GOD TELL ME NOW";

You would think that those lines of text would show up on different vertical rows, but they don't. To get the effect of pressing enter, you would have to endl;

int main ()

{

cout<< "WHY IS THIS SO DIFFICULT HNNNNG" endl;
cout <<"PLEASE GOD TELL ME NOW";
}
return0;

Also I recommend you space things out a bit more. It cout<<"texthere"endl; might get kindof hard to read in the midst of a wall-o-code.

If you continue to learn and need help, check out #C++. They always have a few people in there, like Blam, who really know what they're doing.

May I ask what compiler you are using?
Last edited by jxc1013; Jan 24, 2011 at 12:33 PM. Reason: <24 hour edit/bump
Thanks.
I haven't been using one. I just downloaded one yesterday, Microsoft visual c++ or whatever.
You should get Dev C++ instead

lot easier, don't have to include extra directories or whatever
Thanks.
from what it says, it doesn't support windows 7.

I'm fine with visual c++ for now. It's something atleast.

#include <iostream>
int main()
{
	using namespace std;
	
	cout<< "This is a 2 number addition calculator, please enter the first number" << endl;
	
	int a = 0;
	int b = 0;
	int x = 0;
	int result;

	cin>> a;

	cout<< "Now enter the second number" << endl;
	
	cin>> b;

	cout<< "Your answer is " << endl;
	result=a+b;
	cout<< result;
	cin>> x;
	cin.get();
	return 0;
}
MY FIRST EVER C++ SUCCESS <3
/me is proud
I'm using 7 D:
But yeah, if you're already used to it, keep using it, etc

also I can see you got cin.get(); to work
Thanks.