用vc6.0实现c语言实现的数据结构应该建哪个工程实现啊?

来源:百度知道 编辑:UC知道 时间:2024/05/19 05:20:06

首先打开vc++6.0---Ctrl+n--选择Win32 Console Application--然后在右边写上工程名字---然后再按Ctrl+n--选择C++ Source File--再填上文件名称。
最后把下面的粘贴上去。。。。

#include <iostream> //头文件
using namespace std;

int main()
{
cout <<"Enter the a:"; //输出:确定A,数字
int a;//定义 A
cin >>a;//输入:A
cout <<"Enter the b:";//输出:确定B
int b;
cin >>b;
int sum=a+b;//SUM=A+B

cout <<"The sum is:" <<sum <<endl; //输出结果、ENDL是换行
return 0;
}

不知道这个能不能帮到你?

控制台工程