上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 54 下一页
摘要: 源程序: #include <iostream>using namespace std;class Point //基类,也叫父类{protected: int x,y;public: Point(int a,int b) { x=a; y=b; } void show() { cout<<"x=" 阅读全文
posted @ 2020-12-28 19:31 bobo哥 阅读(145) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>#include <iomanip>using namespace std;int main(){ int x,i,j,arr[7]; freopen("d:\\cccccc\\input.txt","r",stdin); for(i=0;i<7;i+ 阅读全文
posted @ 2020-12-27 20:13 bobo哥 阅读(95) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h>#include <string.h>void StringCopy(char* strSource, char* strDestination){ int i = 0; while(*strSource!='\0') { * 阅读全文
posted @ 2020-12-15 22:23 bobo哥 阅读(637) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>using namespace std; class CCount //定义类CCount{public: CCount(void); //构造函数 ~CCount(void); //析构函数 int GetCount(void); //成员函数 vo 阅读全文
posted @ 2020-12-15 21:19 bobo哥 阅读(191) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>using namespace std; //定义类的模板class A //类的定义{private: int x,y; const int z;public: //A(){}; //缺省的构造函数 A(int a,int b,int c):x(a) 阅读全文
posted @ 2020-12-15 21:06 bobo哥 阅读(121) 评论(0) 推荐(0)
摘要: 源程序: #include <stdio.h>#include <string.h>#include <malloc.h> char *GetMemory(int num){ char *p=(char *)malloc(sizeof(char)*num); return p;} void main 阅读全文
posted @ 2020-12-15 20:48 bobo哥 阅读(117) 评论(0) 推荐(0)
摘要: 源程序: #include <stdio.h>#include <malloc.h> struct Student //结构体{ int sid; //学号 int age; //年龄}; struct Student *CreateStudent(){ struct Student *stu=(s 阅读全文
posted @ 2020-12-15 20:40 bobo哥 阅读(219) 评论(0) 推荐(0)
摘要: 源程序: #include <stdio.h>#include <stdlib.h>#include <string.h>void StringCopy(char *strSource,char *strDestination){ int i; for(i=0;strSource[i]!='\0'; 阅读全文
posted @ 2020-12-15 19:43 bobo哥 阅读(149) 评论(0) 推荐(0)
摘要: 源程序: #include <iostream>using namespace std; class Test{private: int Width,Height;public: //以下是函数 void SetValue(int iWidth,int iHeight) { Width=iWidth 阅读全文
posted @ 2020-12-15 19:11 bobo哥 阅读(113) 评论(0) 推荐(0)
摘要: 源程序: #include <stdio.h>#include <string.h> int main(){ char str[20]; int length; length=strlen(strcpy(str,"Hello World!")); printf("字符串长度:%d\n",length 阅读全文
posted @ 2020-12-14 21:30 bobo哥 阅读(154) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 54 下一页