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

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

 getline(inFile, p[i].name);      //未找到匹配的重載函數(shù) 頭文件什么都有,錯誤在哪啊?

#include<iostream>#include<fstream>#include<cstdlib>#include<string>using namespace std;struct Patron{?char name[20];?double money;};int main(){?cout << "請輸入捐獻(xiàn)者數(shù)目";?ifstream inFile;?inFile.open("homework6_9.txt");?if (!inFile.is_open())?{??cout << "Could not open the file." << endl;??exit(EXIT_FAILURE);?}??int num;?inFile >> num;?inFile. get();?char ch;?inFile >> ch;?Patron *p = new Patron[num];??for (int i = 0; i < num; i++)??{???inFile.get();???getline(inFile, p[i].name); ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //未找到匹配的重載函數(shù)???inFile >> p[i].money;??}??cout << "Geand Patrons" << endl;??int count1 = 0;??int count2 = 0;??for (int i = 0; i < num; i++)??{???if (p[i].money > 10000)???{????cout << p[i].name <<" , "<<p[i].money<< endl;????count1++;???}???if (count1 == 0)????cout << "none" << endl;??}??cout << "Other Patrons";??for (int i = 0; i < num; i++)??{???if (p[i].money <= 10000)???{????cout << p[i].name << " , "<<p[i].money<<endl;????count2++;???}???if (count2 == 0)????cout << "none" << endl;??}?inFile.close();?return 0;}
查看完整描述

1 回答

?
xungeer29

TA貢獻(xiàn)46條經(jīng)驗 獲得超20個贊

解決了,問題好多,感覺自己好蠢。。。。。。。。。。。


查看完整回答
反對 回復(fù) 2017-10-10
  • 1 回答
  • 0 關(guān)注
  • 2213 瀏覽

添加回答

了解更多

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

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

公眾號

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