Search Results

Search found 2 results on 1 pages for 'azodious'.

Page 1/1 | 1 

  • Calling private event handler from outside class

    - by Azodious
    i've two classes. One class (say A) takes a textbox in c'tor. and registers TextChanged event with private event-handler method. 2nd class (say B) creates the object of class A by providing a textbox. how to invoke the private event handler of class A from class B? it also registers the MouseClick event. is there any way to invoke private eventhandlers?

    Read the article

  • Copy object using pointer (templates)

    - by Azodious
    How the push_back of stl::vector is implemented so it can make copy of any datatype .. may be pointer, double pointer and so on ... I'm implementing a template class having a function push_back almost similar to vector. Within this method a copy of argument should be inserted in internal memory allocated memory. but the argument is a pointer. (an object pointer). Can you pls tell how to create copy from pointer. so that if i delete the pointer in caller still the copy exists in my template class? Code base is as follows: template<typename T> class Vector { public: void push_back(const T& val_in) { T* a = *(new T(val_in)); m_pData[SIZE++] = a; } } Caller: Vector<MyClass*> v(3); MyClass* a = new MyClass(); a->a = 0; a->b = .5; v.push_back(a); delete a; Thanks.

    Read the article

1