http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net
发布时间:2011-12-18 10:56:39
#include <iostream>using namespace std;struct _A; struct _B; typedef void (*dealloc)(struct _A *a); typedef struct _A { int i; dealloc b;}A;void free_used_b(struct _A *a){ delete a;}int main(){ cout<<"hello,world"<<endl; for (size_t i=0; i.........【阅读全文】
发布时间:2011-12-02 15:15:10
#include <iostream>#include <stdexcept>#include <set>using namespace std; class Item_base {public: Item_base(string book,double f):isbn(book),price(f) {} string .........【阅读全文】
发布时间:2011-12-01 10:53:03
#include <iostream>//#inclde <string>#include <vector>using namespace std; class Base{public: Base(const string& str,double i):book(str),price(i) {} virtual double net_price(int n) const.........【阅读全文】
发布时间:2011-11-30 19:43:10
struct Derived:Base{ Derived(int i):mem(i) {} int get_mem() { return Base::mem;}private: int mem;};int main(){ Derived d(43); int resu.........【阅读全文】