李雨桐薛之谦亲密照:请问怎么样使这些文件连接起来最后执行?就是想知道在vc6.0环境下的具体操作步骤?谢谢!
来源:百度文库 编辑:高考问答 时间:2024/05/13 05:00:08
一共是两个源文件组成一个程序,假设工程文件名为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选择要加的原文件