What does the C compiler error "looks like a function definition, but there is no parameter list;" m
- by user312309
#include <iostream>
#include <fstream>
using namespace std;
int main
{
int num1, num2;
ifstream infile;
ostream outfile;
infile.open("input.dat");
outfile.open("output.dat");
infile >> num 1 >> num 2;
outfile << "Sum = " << num1 + num2 << endl;
infile.close()
outfile.close()
return 0;
}
this is what i did and when i compile it, i got this error that said
error C2470: 'main' : looks like a function definition, but there is no parameter list; skipping apperent body
please dont hate me :( i am new at this computer science....