c++数据结构与算法|c++类实例化的两种方式

/* * HelloWorld.cpp * *Created on: 2016年7月13日 *Author: zroad */#include #include #include using namespace std; class C { public: C(string s = "", int i = 0, double d = 1.0) { dataMember1 = s; dataMember2 = i; dataMember3 = d; }void memberFunction1() { cout << dataMember1 <<' '<memberFunction1(); obj2->memberFunction2(1000, "C++"); delete obj2; cout << "The end!" << endl; return 0; }

    推荐阅读