// This is the main project file for VC++ application project // generated using an Application Wizard. #include "stdafx.h" #using #include using namespace System; #pragma unmanaged class Unmanaged { public: virtual bool IsItANiceDay (); bool Call_IsItANiceDay () {return IsItANiceDay ();} }; bool Unmanaged::IsItANiceDay () { return false; } #pragma managed // This is the entry point for this application int _tmain(void) { Unmanaged *um = new Unmanaged; if (um->Call_IsItANiceDay ()) Console::WriteLine(S"Hello World, what a nice day"); else Console::WriteLine(S"Hello World, what an awful day"); return 0; }