第一个文件 tobin.h#include<string.h>
#include<stdlib.h>
#include <math.h>char num3[3];
char num6[6];
char num7[7];
char num8[8];
char num5[5];
char num13[13];
char num15[15];CString strpi;
CString strbl;
CString strct;void tobin (int s,char* pch,int n) 
{
char bin[255]={'0'};
for (int i=0;i<n;i++)
{
bin[i]=s%2;
s=s/2;
}
for (int j=0;j<n;j++)
{
if(!bin[n-1-j])
*(pch+j)='0';
else *(pch+j)='1';
}
}第二个文件 externs.h
extern char num3[3];
extern char num6[6];
extern char num7[7];
extern char num8[8];
extern char num5[5];
extern char num13[13];
extern char num15[15];extern CString strpi;
extern CString strbl;
extern CString strct;extern void tobin (int s,char* pch,int n);
我第一个文件只调用了一次,其余用到函数的我都是调用第二个文件,为什么还是说变量和函数重复定义呢???