事情是这样的,我在一个c++项目中需要用到一个头文件和若干对象。举例如下:
- func1.h
#include <iostream>
void func_1();
- func1.cpp
#include "func1.h"
using namespace std;
void func_1()
{
cout << "in the fuction 1." << endl;
}
- test.h
#include <iostream>
using namespace std