Seems simple enough. Could somebody offer some insight?

15 yo learning C++. This seems simple enough. (I'm probably missing something) I tried compiling in visual c++ but it wouldn' work.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37



// Classes.cpp : Defines the entry point for the console application.
//
#include <stdafx.h>
#include <iostream>
#include <string>

using namespace std;



int main()
{
	int firstNumber;
	int secondNumber;
	int thirdNumber;
cout << "enter first number" << endl;

	cin >> firstNumber;
cout << "Enter Second Number" << endl;
	
	cin << secondNumber; 

cout << "Enter the final number";	
	cin << thirdNumber;

cout << firstNumber << " was the first number you entered." << endl;
cout << secondNumber << " was the second number you entered" << endl;
cout << thirdNumber << " was the third number you entered\n";
register int total = firstNumber + secondNumber + thirdNumber;
cout << "The Value Of Those Numbers Respectively is : " << total << endl;
system("PAUSE");
return 0;
}


Thanks!
Change << to >> on line 24 and 27.
Thanks!
Topic archived. No new replies allowed.