// This is the main project file for VC++ application project // generated using an Application Wizard. #include "stdafx.h" #using #include #include #include "wizard.h" #include "managed.h" using namespace System; // This is the entry point for this application #ifdef _UNICODE int wmain(void) #else int main(void) #endif { Console::Write(S"\n Hello from Console::Write"); std::wcout << L"\n Hello from iostream::wcout"; std::wstring msg1 = L"\n unmanaged class generated by wizard"; msg1 += L"\n created on main's stack frame"; wizard wiz(msg1); std::wcout << wiz.show().c_str(); std::wstring msg2 = L"\n unmanaged class generated by wizard"; msg2 += L"\n created on unmanaged heap"; wizard *pWiz = new wizard(msg2); std::wcout << pWiz->show().c_str(); delete pWiz; String &msg3 = *new String("\n managed class created on managed heap"); Managed &Man = *new Managed(msg3); Console::Write(&Man.show()); std::wcout << L"\n\n"; return 0; }