求助字符串的操作
#include<stdio.h>
struct stu
{
char suiji[11];
char key[11];
char reg[11];
char sn[11];
char num[11];
}boyb[2],*qq;
main()
{
FILE *fp;
char ch;
int i;
qq=boyb;
if((fp=fopen("stu_list","rb+"))==NULL)
{
printf("Cannot open file strike any key exit!");
getch();
exit(1);
}
fscanf(fp,"%s %s %s %s %s\n",qq->suiji,&qq->key,&qq->reg,qq->sn,qq->num);
qq=boyb;
printf("%s %s %s %s %s\n",qq->suiji,qq->key, qq->reg,qq->sn,qq->num);
fclose(fp);
}
字符串正常读写了
但是怎么转换成数字进行计算啊
文件都是10位的整数计算
然后在转换成字符存储