摘要: C++语言: Codee#2573001 #include <>iostream>02 using namespace std;03 04 union U05 {06 private:07 int i;08 float f;09 public:10 U(int a);11 U(float b);12 ~U();13 int read_int();14 float read_float();15 };16 17 U::U(int a)18 {19 i = a;20 }21 22 U::U(float b)23 {24 f = b;25 }26 27 U::~U()28 {29 阅读全文
posted @ 2012-03-05 20:43 strorehouse 阅读(167) 评论(0) 推荐(0) 编辑
摘要: C++语言: Codee#2572801 /* 02 table-driven example from <<thinking in cpp>>03 */04 05 06 #include <iostream>07 using namespace std;08 09 #define DF(N) void N(){\10 cout << "function"#N " called..."<<endl;}11 12 DF(a);13 DF(b);14 DF(c);15 DF(d);16 17 voi 阅读全文
posted @ 2012-03-05 10:24 strorehouse 阅读(148) 评论(0) 推荐(0) 编辑