nothing
10-13-2003, 02:51 PM
First, take a look at this program:
#include <iostream>
using std::cout;
using std::endl;
int main()
{
cout << pow(2,2) << endl;
return 0;
}
I compiled and ran this program successfully under Linux, using gcc version 3.2.2. After a while, I noticed it is wrong, because I forgot to include the cmath reader file. So I started to wonder why did this program compiled if it is wrong. I decided to try to compile it using MS VC++ 6.0 and as I expected, it didn't compile because the cmath reader file was misssing. My question is: which one is right? GCC or MS VC++ 6.0?
#include <iostream>
using std::cout;
using std::endl;
int main()
{
cout << pow(2,2) << endl;
return 0;
}
I compiled and ran this program successfully under Linux, using gcc version 3.2.2. After a while, I noticed it is wrong, because I forgot to include the cmath reader file. So I started to wonder why did this program compiled if it is wrong. I decided to try to compile it using MS VC++ 6.0 and as I expected, it didn't compile because the cmath reader file was misssing. My question is: which one is right? GCC or MS VC++ 6.0?