Hey guys, im just learning C++ and i really want to learn it, but im having some compiling errors and i've looked around and i dont know what else to do. So i was hoping one of you guys could help me out.
so this is my code:
Code:
#include <iostream>
int main()
{
int integer1, integer2, sum;
std::cout << "Enter first integer\n";
std::cin >> integer1;
std::cout << "Enter second integer\n";
std::cin >> integer2;
sum = integer1 + integer2
std::cout << "Sum is " << sum << std::endl;
return 0;
}
Its pretty simple enough, and i know what its supposed to do, but its not becuase its not compiling.
These are the errors i get when i compile and try to run the file:
Code:
c:\users\bioshock\documents\c++\untitled1.cpp: In function `int main()':
c:\users\bioshock\documents\c++\untitled1.cpp:12: use of namespace `std' as expression
c:\users\bioshock\documents\c++\untitled1.cpp:12: parse error before `::'
Im not really sure what that meant, so any help would be nice.
Thanks.