三个文件全部帖给你! // 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; }
#include <iostream> using namespace std;void main() { cout<<"hello world!"<<endl; }
{
MessageBox(NULL, "Hello World!", "Hello World!", MB_OK); return 0;
}
{
printf( "\nHello World\n" );
}
{
printf("hello world"); return 0;
}
// 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;
}
using namespace std;void main()
{
cout<<"hello world!"<<endl;
}