- C语言头文件
//
// Created by CWF on 2022/6/4.
//
#ifndef STUDY_TEST_H
#define STUDY_TEST_H
#ifdef __cplusplus
extern "C"{
#endif
#include
void show();
#ifdef __cplusplus
};
#endif
#endif //STUDY_TEST_H
test.c
#include "test.h"
void show(){
printf("Hello World!");
}
main.cpp
#define _CRT_SECURE_NO_WARNINGS #includeusing namespace std; #include "test.h" extern "C" void show(); void test01(){ show(); } int main(){ test01(); return EXIT_SUCCESS; }



