如题

解决方案 »

  1.   

    #include <windows.h>int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
    {
    MessageBox(NULL, "Hello World!", "Hello World!", MB_OK); return 0;
    }
      

  2.   

    #include <stdio.h>void main( void )
    {
       printf( "\nHello World\n" );
    }
      

  3.   

    #include <stdio.h>int main()
    {
        printf("hello world");    return 0;
    }
      

  4.   

    三个文件全部帖给你!
    // stdafx.h : include file for standard system include files,
    //  or project specific include files that are used frequently, but
    //      are changed infrequently
    //#if !defined(AFX_STDAFX_H__49DAD0AE_EEED_444D_9B35_0013E036FF4F__INCLUDED_)
    #define AFX_STDAFX_H__49DAD0AE_EEED_444D_9B35_0013E036FF4F__INCLUDED_#if _MSC_VER > 1000
    #pragma once
    #endif // _MSC_VER > 1000#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers#include <stdio.h>// TODO: reference additional headers your program requires here//{{AFX_INSERT_LOCATION}}
    // Microsoft Visual C++ will insert additional declarations immediately before the previous line.#endif // !defined(AFX_STDAFX_H__49DAD0AE_EEED_444D_9B35_0013E036FF4F__INCLUDED_)// stdafx.cpp : source file that includes just the standard includes
    // 1.pch will be the pre-compiled header
    // stdafx.obj will contain the pre-compiled type information#include "stdafx.h"// TODO: reference any additional headers you need in STDAFX.H
    // and not in this file
    // 1.cpp : Defines the entry point for the console application.
    //#include "stdafx.h"int main(int argc, char* argv[])
    {
    printf("Hello World!\n");
    return 0;
    }
      

  5.   

    #include <iostream>
    using namespace std;void main()
    {
        cout<<"hello world!"<<endl;
    }