What does the C compiler error "looks like a function definition, but there is no parameter list;" m
Posted
by user312309
on Stack Overflow
See other posts from Stack Overflow
or by user312309
Published on 2010-04-08T22:46:17Z
Indexed on
2010/04/08
22:53 UTC
Read the original article
Hit count: 475
c++
#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....
© Stack Overflow or respective owner