上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 54 下一页
摘要: 源程序:在vc++6.0中运行通过 // c0,c1,c2,c3,c4四个结点,在程序中和0,1,2,3,4来表示 // main.cpp // top_sort // // Created by duanqibo on 2019/12/20. // Copyright © 2019年 duanqi 阅读全文
posted @ 2019-12-20 15:23 bobo哥 阅读(192) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream> using namespace std; class BaseClass { public: int v1, v2; BaseClass() { v1 = 1; v2 = 1; } int temp1() {} }; class DerivedCla 阅读全文
posted @ 2019-12-18 17:23 bobo哥 阅读(125) 评论(0) 推荐(0)
摘要: 源程序: // // main.cpp // p154 // // Created by duanqibo on 2019/12/18. // Copyright © 2019年 duanqibo. All rights reserved. // #include <iostream> using 阅读全文
posted @ 2019-12-18 16:24 bobo哥 阅读(185) 评论(0) 推荐(0)
摘要: 源程序: //"+"、"-"运算符重载 #include <iostream> using namespace std; class myComplex { private: double real, imag; public: myComplex(); myComplex(double x, do 阅读全文
posted @ 2019-12-18 14:56 bobo哥 阅读(208) 评论(0) 推荐(0)
摘要: 源程序: #include <stdio.h>#include <stdlib.h>#include <math.h>void prime(int m){ int k,i; k = (int) sqrt(m); for (i = 2; i <= k; i++) if (m % i == 0) bre 阅读全文
posted @ 2019-12-15 16:07 bobo哥 阅读(940) 评论(0) 推荐(0)
摘要: 源程序: //把从键盘输入的文本按原样输出到名为file_a.txt的文件中,用字符@作为键盘输入//结束的标志#include <stdio.h>#include <stdlib.h>int main(){ FILE *fpout; char ch; if((fpout=fopen("e:\\fi 阅读全文
posted @ 2019-12-13 09:31 bobo哥 阅读(817) 评论(0) 推荐(0)
摘要: 源程序: //把一个已经存在磁盘上的file_a.txt文本文件中的内容原样输出到终端上#include <stdio.h>#include <stdlib.h>int main(){ FILE *fpin; char ch; if((fpin=fopen("e:\\file_a.txt","r") 阅读全文
posted @ 2019-12-13 09:26 bobo哥 阅读(349) 评论(0) 推荐(0)
摘要: 源程序: #include <stdio.h>#include <stdlib.h>int main(){ int i; char s[100]; FILE *fp; if((fp=fopen("e:\\file.txt","w+"))==NULL) { printf("can't open thi 阅读全文
posted @ 2019-12-13 09:22 bobo哥 阅读(1700) 评论(1) 推荐(1)
摘要: 源程序: #include <stdio.h>#include <stdlib.h>void filecopy(FILE *,FILE *);int main(){ FILE *fpin,*fpout; fpin=fopen("e:\\file_a.txt","r"); fpout=fopen("e 阅读全文
posted @ 2019-12-13 09:16 bobo哥 阅读(1764) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream> #include <string> using namespace std; class myDate { private: int year, month, day; public: myDate(); void setDate(int y,int 阅读全文
posted @ 2019-12-11 13:41 bobo哥 阅读(205) 评论(0) 推荐(0)
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 54 下一页