文章分类 -  C++

摘要:1.构造函数 #include <iostream> #include <string> using namespace std; class myDate{ public: //声明4个构造函数 myDate(); //不带参构造函数 myDate(int);//带1个参数 myDate(int, 阅读全文
posted @ 2020-09-24 13:39 做一只热爱生活的小透明 阅读(142) 评论(0) 推荐(0)
摘要:1.类的定义示例 #include <iostream> #include <string> using namespace std; class myDate{ public: myDate(); //构造函数 myDate(int,int,int);//构造函数 void setDate(int 阅读全文
posted @ 2020-09-22 10:16 做一只热爱生活的小透明 阅读(86) 评论(0) 推荐(0)
摘要:1.基本的输入/输出 #include <iostream> #include <string> using namespace std; int main(){ int oneInt1,oneInt2; char strArray[20]; string str; double oneDouble 阅读全文
posted @ 2020-09-18 18:00 做一只热爱生活的小透明 阅读(142) 评论(0) 推荐(0)