Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class base
- {
- public:
- base():size(), p_array(0){}
- private:
- size_t size;
- boost::shared_array<unsigned char> p_array;
- };
- class derived
- {
- public:
- derived(size_t array_size):size(array_size)
- {
- p_array.reset(new unsigned char[size]);
- }
- };
- p_array.reset(new unsigned char[size]);
- class base
- {
- public:
- base():size(), p_array(0){}
- base(size_t array_size):size(array_size)
- {
- p_array.reset(new unsigned char[size]);
- }
- private:
- size_t size;
- boost::shared_ptr<unsigned char> p_array;
- };
- class derived
- {
- public:
- derived(size_t array_size):base(array_size)
- {
- }
- private:
- };
- class base
- {
- base(size_):size(size_), p_array(new char[size_]) {}
- }
- class largebufferderived : public base
- {
- public:
- largebufferderived() : base(77220) {}
- }
- boost::shared_ptr<char> Buffer()
- {
- if (!p_Array)
- p_array.reset(new unsigned char[size]);
- }
Add Comment
Please, Sign In to add comment