在医院干库管工资待遇:请问怎么样使这些文件连接起来最后执行?就是想知道在vc6.0环境下的具体操作步骤?谢谢!
来源:百度文库 编辑:杭州交通信息网 时间:2024/05/08 14:59:14
一共是两个源文件组成一个程序,假设工程文件名为ch1.prj
a.cpp如下:
#include <iostream.h>
int n;
void fn();
void main()
{
n=20;
cout<<n<<endl;
fn();
}
b.cpp如下:
#include <iostream.h>
static int n;
void fn()
{
n++;
cout<<n<<endl;
}
a.cpp如下:
#include <iostream.h>
int n;
void fn();
void main()
{
n=20;
cout<<n<<endl;
fn();
}
b.cpp如下:
#include <iostream.h>
static int n;
void fn()
{
n++;
cout<<n<<endl;
}
project->add to project->files选择要加的原文件