I started learning c++ many years ago in windows and now wants to recap that in OS X.
This code:
Generates the following error:
Whats wrong?
And BTW. I tried first to include iostream.h but the compiler then warned that it is "decrepated". Should I no longer, for any cpp header, use ".h"?
Thanks for all help!
This code:
Code:
#include <iostream>
int main();
{
cout << "Hello World!\n";
return 0;
}
Generates the following error:
Code:
hello.cpp:4: error: expected unqualified-id before { token
Whats wrong?
And BTW. I tried first to include iostream.h but the compiler then warned that it is "decrepated". Should I no longer, for any cpp header, use ".h"?
Thanks for all help!