摘要: #include<iostream>#include<string>using namespace std;int main(){ string line; cout<<"Type a line terminated by 't'"<<endl; getline(cin,line,'t'); cou 阅读全文
posted @ 2023-05-15 11:57 不会JAVA的小袁 阅读(10) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<fstream>using namespace std;int main(){ ifstream file("integers",ios_base::in | ios_base::binary); if(file){ while (file){ 阅读全文
posted @ 2023-05-15 11:49 不会JAVA的小袁 阅读(9) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<sstream>#include<string>using namespace std;template<class T>inline T fromString(const string &str){ istringstream is(str); 阅读全文
posted @ 2023-05-15 11:41 不会JAVA的小袁 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<fstream>using namespace std;int main(){ int values[]={3,7,0,5,4}; ofstream os("integers",ios_base::out | ios_base::binary); 阅读全文
posted @ 2023-05-15 11:32 不会JAVA的小袁 阅读(11) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<fstream>#include<cstring>using namespace std;struct SalaryInfo{ unsigned id; double salary;};int main(){ SalaryInfo employe 阅读全文
posted @ 2023-05-15 11:21 不会JAVA的小袁 阅读(12) 评论(0) 推荐(0) 编辑