read.cpp: in function int main()´:
read.cpp:12:16: error: argument of type `bool (std::basic_ios<char>::)() const´
does not match `bool`
read.cpp:12:16: error: in argument to unary !
read.cpp:18:16: error: 'System was not declared in this scope'
and after changing my code to
while(!infile.eof())
error is reduced to
read.cpp: in function 'int main()':
read.cpp:18:16: error: 'system' was not declare in this scope
system (lower case 's' at the start) is a function that lives in the cstdlib header file. You'll have to #include it, although system is really, really not a good idea.
As it is, you're trying to use it to call the Windows command "pause", which will be a bit of a disaster given that you're not using Windows.