摘要: #include<iostream> #include<string.h> using namespace std; struct date //结构体可以定义在函数内,但是不能在函数外调用 { int year; int month; int day; }X1,X2,X3; //在没有typede 阅读全文
posted @ 2020-07-29 21:17 归江渡鸟泅白浪 阅读(115) 评论(0) 推荐(0)
摘要: include<iostream> using namespace std; int* Array() { int *a; a=new int [10]; for(int i=0;i<10;i++) { a[i]=i+1; cout<<a[i]<<" "; } cout<<endl; return 阅读全文
posted @ 2020-07-28 23:36 归江渡鸟泅白浪 阅读(313) 评论(0) 推荐(0)
摘要: #include<iostream> #include<string> using namespace std; class point{ private: int x; int y; public: void setx(int x){ this->x=x; } int getx(){ return 阅读全文
posted @ 2020-07-28 22:48 归江渡鸟泅白浪 阅读(179) 评论(0) 推荐(0)
摘要: #include<iostream> #include<string> #include<ctime> using namespace std; #define max 100000 void Bubble(int arr[]); int main() { //int arr[6]={5,4,8,7 阅读全文
posted @ 2020-07-28 22:41 归江渡鸟泅白浪 阅读(258) 评论(0) 推荐(0)
摘要: void clear()//清屏函数 { char buf[1024]={0}; cout<<"请输入回车键继续……"<<endl; fgets(buf,1024,stdin); system("clear"); } 这里运用fgets函数获取我们键盘的回车指令之后再继续运行执行system("cl 阅读全文
posted @ 2020-07-28 21:50 归江渡鸟泅白浪 阅读(2094) 评论(0) 推荐(0)