ちょっとしたテストプログラムを書こうと思って、Visual C++ 2005 Express Editionでコーディング。入出力にcin,coutを使おうとしたらコンパイルエラーが。
#include <iostream> int main() { cout << "test" << endl; }
cin,coutはstdというnamespaceで定義されているので、std::を付けるか、usingが必要。
std::cout << "test" << endl;
using namespace std;