I just started programming in C++ and need help. I created a basic adding program and it won't compile. What is wrong with it?
Here's the program:
//This program will add numbers
#include
#include
#include
using namespace std;
int main (int argc, char *argv[]);
{
char quit;
quit = '\0';
while (quit != 'q')
{
int x;
cout << "enter the 1st value";
cin >> x;
int y;
cout << "enter the 2nd value";
cin >> y;
int a;
a = x + y;
cout << "The sum of the two values is:";
cout << a << endl;
}
system("PAUSE");
return 0;
}
2007-08-12
10:24:22
·
3 answers
·
asked by
unknown
1
in
Computers & Internet
➔ Programming & Design
According to the compiler the error s on line 8. It says: "expected unqualified-id before '{' token"
2007-08-12
10:27:46 ·
update #1
I tried removig the ";" and more errors actually appeared.
2007-08-12
10:33:45 ·
update #2