visual studio 2012 c++ hello world - iostream not working

前端 未结 6 931
轮回少年
轮回少年 2021-02-08 21:48

I have an issue with Visual Studio\'s 2012. I am also using \"Sams Teach Yourself C++ in One Hour a day, 7th edition\".

After using google to find the \"best\" compilers

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-08 22:35

    The Win32 console application is actually quite different from the empty project. Win32 utilize a message (input) queue which you poll in a loop and your program respectively utilizes the Win32 API and performs certain operations.

    The empty project is a bit less dependent on Win32 or anything that Windows provides in terms of API unless you make it dependent on it. This would be the simples hello world app in you empty project:

    #include 
    
    using namespace std;
    
    int main() 
    {
        cout << "Hello World" << endl;
    
        return 0;
    }
    

提交回复
热议问题