求VC++的使用说明(基本)

来源:百度知道 编辑:UC知道 时间:2024/06/18 10:18:10
即:
vc++的格式等。。

#include<iostream>
using namespace std;
int main()
{
/*
在这里写你要的程序 这个最简单 最基础
*/
//例如:
cout<<"Hello Word!!!"<<endl; //经典的Hello Word程序
return 0;
}

#include<iostream>//主函数中出现的一些词,要找到相应的头文件加以说明
using namespace std;//命名空间
int main()//main()标志着主函数开始
{}//大括号中的是程序

A Simple but Complete Example
Most of the examples in this article are just code fragments, but this one is a complete "Hello world" program written with ATL window classes. Although it uses ATL, it does not use COM, so it can be built in Visual C++® as a Win32® application rather than as an ATL COM project.

In stdafx.h, put these lines:

#include <atlbase.h>
extern CComModule _Module;
#include <atlwin.h>

In hello.cpp, put these:

#include "stdafx.h"
CComModule _Module;
class CMyWindow : public CWindowImp