摘要: 001:简单的SumArray 填写模板 PrintArray,使得程序输出结果是: TomJackMaryJohn 10 不得编写SumArray函数 #include <iostream> #include <string> using namespace std; template <clas 阅读全文
posted @ 2020-04-19 20:45 没温度的风 阅读(173) 评论(0) 推荐(0)
摘要: 001:看上去像多态 #include <iostream> using namespace std; class B { private: int nBVal; public: void Print() { cout << "nBVal=" << nBVal << endl; } void Fun 阅读全文
posted @ 2020-04-12 20:48 没温度的风 阅读(228) 评论(0) 推荐(0)
摘要: 003:编程填空:统计动物数量 查看 提交 统计 提问 总时间限制: 1000ms 内存限制: 65536kB描述 代码填空,使得程序能够自动统计当前各种动物的数量 #include <iostream> using namespace std; // 在此处补充你的代码 void print() 阅读全文
posted @ 2020-03-27 23:38 没温度的风 阅读(273) 评论(0) 推荐(0)
摘要: #include <iostream>using namespace std;class A { public: int i; A(int x) { i = x; } ~A(){cout<<i<<endl;}};int main(){ A a(1); A * pa = new A(2); delet 阅读全文
posted @ 2020-03-26 22:25 没温度的风 阅读(156) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2020-03-26 22:12 没温度的风 阅读(0) 评论(0) 推荐(0)