I have a simple Win32 console (no vcl) app written in Borland C++ 5, now I want compile the same application in VS 2010. but I’m new using this IDE and I don’t know how run the code in VS. I tried choosing Win32 Console Application. but even i very simple app like this
#include <iostream.h>
#pragma hdrstop
#pragma argsused
int main(int argc, char* argv[])
{
cout << "Hello" << endl;
getchar();
return 0;
}
does not compile in VS.
So, What kind of VS 2010 C++ Project I must choose to compile a simple Borland C++ 5 Console app? or I need modify my app in order to use VS C++?
<iostream.h>is deprecated, and VS10 does not support it, use<iostream>instead, and you’ll also needstd::cout,std::endl, etc.. i.e.Alternatively, if you don’t want to prefix your library uses with
std::, you can put a using declaration at the top, after the headers: