1樓:匿名使用者
整個檔案都拷到緩衝區了,那就不用顧慮大小了,可以直接用strstr函式,那樣快很多。
好吧回到你的程式:
for(i=0;i
if(j==length)
假設你想找eva那你這個for迴圈只執行3次,肯定不能找到的(當然我知道你是想只找3行,問題是你的換行沒法保障啊),改成:
for(i=0;i<81;i++)
下面也相應修改一下:
if(j==length)
。。。。。。。
越改越麻煩了。。。算了,你還是用strstr吧。暈死 :
if(0 != strstr(getinformation,name))
printf("%s \n",getinformation);
else
printf("\nthe student you search for doesn't exist, please check the name.\n");
2樓:匿名使用者
我試過了,第一行人名沒有問題
樓主可以看一下informationofstudents放的位置是否正確
fgets(getinformation,81,outfile);
後面加上
printf("%s \n",getinformation);
看看是否有資料讀入。
用c語言設計課程資訊管理系統,用C語言設計一個課程資訊管理系統
include include include include using namespace std struct list typedef struct list node typedef node link 函式宣告 link create link head link search link...
c 做一個簡單的學生資訊管理系統
不好意思,可能寫的好長,但是我的實力就是這樣了,仔細看看吧,有什麼問題的話就q我哦369370398 include include include void sort char xh 20 char xm 20 float s void insert char xh 20 char xm 20 f...
開發學生資訊管理系統要做的前期工作,越詳細越好重點 學生資訊包括學生簡歷
先肯定的是 bai 學生調查,du1。拿到學生提出的具體要求,形zhi 成手冊,經檢dao查沒錯下 2。調專查,瞭解要開屬發的系統的具體的執行過程及其功能要求。3。形成系統分析報告。經自己和別人認可。4。系統設計。系統功能模組。5。開始編碼。程式設計階段。6。軟體測試。制定測試計劃。最重要的是要有一...