1.头文件定义需要引入cpp文件
如
定义a.h
#define STUDY_C_COURSE_H
#include <stdio.h>
#import "test1_变量.c"
void test1();
//#endif //STUDY_C_COURSE_H
定义 b.cpp
#include<stdio.h>
#include "course.h"
int a; //全局变量
void test1()
{
printf("%s",a);
}
main方法
#include "course.h"
#define N 1;
#define B 2;
int main() {
char * d;
printf("%x\n",&(**(&d)));
printf("%s",a);
test1();
// printf("%s",1+2);
return 0;
}