包含.h就可以用其对应的函数

//callee.h 被调用者
#pragma once
void display(); //展示函数


//callee.cpp 被调用者
#include "callee.h"
#include <iostream>
using namespace std;

void display()
{
    cout << "hello world!" << endl;
}


//caller.cpp 调用者
#include "callee.h"

int main()
{
    display();
    return 0;
}
posted @ 2018-10-13 10:25  心媛意码  阅读(162)  评论(0编辑  收藏  举报