iOS
-
C++动态内存分配
#include <iostream> using namespace std; class Box { public: Box() { cout << &…
-
C++ new和delete操作符
#include <iostream> using namespace std; int main () { double* pvalue = NULL; // Poi…
-
C++定义新异常
#include <iostream> #include <exception> using namespace std; struct MyExcepti…
-
C++除零异常
#include <iostream> using namespace std; double division(int a, int b) { if( b == 0 …
-
C++读写示例
#include <fstream> #include <iostream> using namespace std; int main () { char…
-
C++抽象类
#include <iostream> using namespace std; // Base class class Shape { public: // pure…
-
C++数据封装
#include <iostream> using namespace std; class Adder { public: // constructor Adder(…
-
C++数据抽象示例
#include <iostream> using namespace std; class Adder { public: // constructor Adder(…
-
C++数据抽象
// C++数据抽象 #include <iostream> using namespace std; int main() { cout << "…
-
C++多态
#include <iostream> using namespace std; class Shape { protected: int width, height;…