第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

文件操作問(wèn)題。fscanf讀取為負(fù)數(shù)?

文件操作問(wèn)題。fscanf讀取為負(fù)數(shù)?

C++ C
萌新程序猿orz 2019-04-09 21:16:29
struct?student?*read_file(){ int?i=0; struct?student?*p1=NULL,*head=NULL,*p2=NULL; FILE?*pfile; pfile?=?fopen("student.txt","r"); if(pfile?==?NULL) { printf("+?????????????????????未發(fā)現(xiàn)存檔????????????????????+\n"); return?0;} while(!feof(pfile)){ p1?=?(struct?student*)malloc(LEN); fscanf(pfile,"%d%d%d%s%s%s%s%s",&p1->idnum,&p1->cardnum,&p1->date,p1->school,p1->sex, &p1->major,&p1->iden,p1->name);???? p1->next=NULL;???? if(i==0)?head=p1;???? else?p2->next=p1;???? p2=p1;???? i++;} fclose(pfile); printf("+?????????????????????讀檔成功?????????????????????+\n"); return?head;}我的idnum是201820020304 這么長(zhǎng)的,可是輸入的卻是負(fù)數(shù),請(qǐng)教大佬
查看完整描述

2 回答

  • 2 回答
  • 0 關(guān)注
  • 1447 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)