| 初歩的な質問ですが、cygwinのgccで Hello World!を以下のように
 -Wno-deprecated をつけると正常にcompileできます。
 
 g++ -O2 -Wno-deprecated welcome.cpp -o welcome
 
 --------------------------------------------
 #include <iostream.h>
 
 int main()
 {
 cout << "Hello World!\n";
 }
 --------------------------------------------
 
 <iostream.h>を<iostream>に変えると以下のエラーがでます。
 
 welcome.cpp: In function `int main()':
 welcome.cpp:24: error: `cout' undeclared (first use this function)
 welcome.cpp:24: error: (Each undeclared identifier is reported only once for each function it appears in.)
 
 <iostream>で正常にcompileするにはどうすればよいでしょうか?
 |