在使用extern类型的变量时,可以不考虑类型?
比如file1.c
char test[] = {0x00, 0x01 ......};
file2.c
extern char test; // ok
extern char *test;//ok
extern int test;// ok
extern void* test;//ok
在使用时比如:
extern char test;
// tmp 指向数组的地址
char* tmp = &test;
这和文件内部使用数组的方法完全不同
char a[] = {0x00, 0x01 ......};
char* b = a;// 而不是 b = &a;
请赐教!