Hello everyone,
I have compiled my first c++ program in Windows environment. (MS VC++). But I am getting error for the simple program.
My program is:
#include<stdio.h>
main()
{
cout<<"Welcome to C++";
cout<<"All the best";
}
Error is
--------------------Configuration: first - Win32 Debug--------------------
Compiling...
hello1.cpp
e:\giri\c++\ex\first\hello1.cpp(4) : error C2065: 'cout' : undeclared identifier
e:\giri\c++\ex\first\hello1.cpp(4) : error C2297: '<<' : illegal, right operand has type 'char [10]'
e:\giri\c++\ex\first\hello1.cpp(5) : warning C4508: 'main' : function should return a value; 'void' return type assumed
Error executing cl.exe.
hello1.obj - 2 error(s), 1 warning(s)
Can anybody tell me what is the problem.