64,652
社区成员
发帖
与我相关
我的任务
分享
//a.h
#ifndef A_H
#define A_H
#include <iostream>
using namespace std;
void displayA()
{
cout<<"this is a.h."<<endl;
}
#endif
#ifndef B_H
#define B_H
#include <iostream>
using namespace std;
void displayB()
{
cout<<"this is b.h."<<endl;
}
#endif
#ifndef C_H
#define C_H
#include <iostream>
using namespace std;
void displayC()
{
cout<<"this is c.h."<<endl;
}
#endif
#include <iostream>
using namespace std;
#include "a.h"
extern void display2();
extern void display3();
extern void displayA();
int main()
{
display2();
display3();
displayA();
}
#include <iostream>
using namespace std;
#include "a.h"
#include "b.h"
extern void displayA();
extern void displayB();
void display2()
{
cout<<"this is 2.cpp."<<endl;
displayA();
displayB();
}
#include <iostream>
using namespace std;
#include "b.h"
#include "c.h"
extern void displayC();
extern void displayB();
void display3()
{
cout<<"this is 3.cpp."<<endl;
displayB();
displayC();
}