源程序: #include <iostream>using namespace std;template <class T> class max{private: T x, y;public: max(T a, T b) { x = a; y = b; } T compare() { return ...
分类:
其他好文 时间:
2020-02-06 01:20:55
阅读次数:
72
源程序: #include <iostream>using namespace std;template <class T> void f(T a[],int n){ T t; for (int i = 0; i < n / 2; i++) { t = a[i]; a[i] = a[n-i-1]; ...
分类:
其他好文 时间:
2020-02-05 23:42:51
阅读次数:
68
源程序: #include <iostream>using namespace std;template <class T> class A{private: T x, y, s;public: A(T a, T b) { x = a; y = b; s = x + y; } void show() ...
分类:
其他好文 时间:
2020-02-05 23:36:13
阅读次数:
70
源程序: #include <iostream>#include <fstream>using namespace std; class triangle{private: int a, b, c; double area;public: triangle(int aa, int bb, int c ...
分类:
其他好文 时间:
2020-02-05 20:31:04
阅读次数:
72
源程序: #include <iostream>#include <fstream>using namespace std; int main(){ int i; ifstream f1("c:\\tmp\\xt1.txt",ios::in); fstream f2("c:\\tmp\\xt2.tx ...
分类:
其他好文 时间:
2020-02-05 18:37:33
阅读次数:
68
源程序: #include <iostream>#include <fstream>using namespace std; int main(){ int i; ofstream ftxt1; ftxt1.open("c:\\tmp\\xt1.txt",ios::out); for (i = 1; ...
分类:
其他好文 时间:
2020-02-05 17:54:22
阅读次数:
62
作者 | 程序员小乐 来源 | 程序员小乐(ID:study_tech) 00 前言 UNIX 与 Linux 之间的关系是一个很有意思的话题。在目前主流的服务器端操作系统中,UNIX 诞生于 20 世纪 60 年代末,Windows 诞生于 20 世纪 80 年代中期,Linux 诞生于 20 世 ...
分类:
系统相关 时间:
2020-02-05 16:21:57
阅读次数:
260
源程序: #include <iostream>#include <string>#include <iomanip>using namespace std; class student{private: string name1; float score1;public: int i; stude ...
分类:
其他好文 时间:
2020-02-05 13:40:38
阅读次数:
67
源程序: #include <iostream>#include <fstream>using namespace std;int main(){ ifstream inFile; inFile.open("c:\\tmp\\test.txt", ios::in); //以读的方式打开文本文件 if ...
分类:
其他好文 时间:
2020-02-05 13:32:40
阅读次数:
73
源程序: #include <string>#include <iostream>#include <algorithm>using namespace std;int main(){ string str = ""; getline(cin, str, '\n'); reverse(str.beg ...
分类:
其他好文 时间:
2020-02-05 13:31:11
阅读次数:
53