PDA

View Full Version : سوال: سرفایل <iostream>



alipnum
شنبه 14 مرداد 1391, 16:56 عصر
سلام
چرا با وجود این که سرفایل #include<iostream> و عبارت using namespace std; را در برنامه به کار بردم
برای دستور cout پیغام cout undeclared identifier را میدهد.
البته در visual studio 2010.

the king
شنبه 14 مرداد 1391, 19:49 عصر
سلام
چرا با وجود این که سرفایل #include<iostream> و عبارت using namespace std; را در برنامه به کار بردم
برای دستور cout پیغام cout undeclared identifier را میدهد.
البته در visual studio 2010.

نوع Project انتخابی تان Win32 Console Application هست؟

#include "stdafx.h"
#include <iostream>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
cout << "Press Enter key to continue.";
getchar();
return 0;
}