上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 54 下一页
摘要: 源程序: #include <iostream>#include <fstream>#include <iomanip>using namespace std;int main(){ char id[11], name[21]; int score; ifstream inFile; inFile. 阅读全文
posted @ 2020-02-05 13:13 bobo哥 阅读(117) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>#include <fstream>using namespace std;int main(){ char id[11], name[21]; int score; ofstream outFile; outFile.open("c:\\tmp\\s 阅读全文
posted @ 2020-02-05 13:10 bobo哥 阅读(96) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>#include <fstream>using namespace std;int main(){ ifstream inFile("c:\\tmp\\test.txt", ios::in); //声明对象inFile并调用构造函数 if (inFil 阅读全文
posted @ 2020-02-05 13:02 bobo哥 阅读(139) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>#include <fstream>using namespace std;int main(){ ifstream inFile; inFile.open("c:\\tmp\\test.txt", ios::in); //以读的方式打开文本文件 if 阅读全文
posted @ 2020-02-05 12:58 bobo哥 阅读(137) 评论(0) 推荐(0)
摘要: 源程序: #include <string>#include <iostream>#include <algorithm>using namespace std;int main(){ string str = ""; getline(cin, str, '\n'); reverse(str.beg 阅读全文
posted @ 2020-02-05 12:39 bobo哥 阅读(111) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>#include <string>#include <iomanip>using namespace std; class student{private: string name1; float score1;public: int i; stude 阅读全文
posted @ 2020-02-05 11:59 bobo哥 阅读(131) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>#include <iomanip>#include <string>using namespace std; int main(){ double x = 3; cout << setiosflags(ios::showpoint|ios::fixe 阅读全文
posted @ 2020-02-05 09:27 bobo哥 阅读(127) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>using namespace std; class Base{public: virtual void fun() { cout << "Base::fun()" << endl; }}; class Derived :public Base{pub 阅读全文
posted @ 2020-02-04 23:13 bobo哥 阅读(157) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>using namespace std; class A{public: int i; virtual void func() { cout << "A0" << endl; } virtual void func2() { cout << "A1" 阅读全文
posted @ 2020-02-04 23:05 bobo哥 阅读(120) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>using namespace std; class Base{public: virtual void display() = 0; };class Derived1 :public Base{public: void display() { cou 阅读全文
posted @ 2020-02-04 22:58 bobo哥 阅读(144) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 54 下一页