Ok so I'm making a simple single operator calculator, but I've ran across a problem. At the end of the compiling process, it turns up an error with the return void; line. I'm sure it has to do with the fact that I voided out the opening and ending, but I wanted to check. And if that's the case, what's a good title type to use for main, and a good return value.
Code:#include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
int main(void)
{
char i;
int integer;
int sum;
{
cout << "Choose the operator: 1(+) 2(-) 3(*) 4(/) \n";
cin >> i;
switch(i)
{
case '+':
cout << "Enter a series of integer's to add\n"
<< "Cancel by entering a negative number\n";
for(integer > 0;;)
{
cin >> integer;
sum = sum + integer;
}
cout << sum;
system("PAUSE");
break;
case '-':
case '*':
case '/':
system("PAUSE");
return void;
}