HI there,
Essentially a C programmer, I would like to know when an object should be instsantiated on the stack and when on the free store.
eg for class fred, we can create objects as follows:
fred myobject;
// use myobject
// myobject.function();
OR
fred myobject = new fred();
// use myobject
// myobject->function();
Can anyone giove some examples...
Thanks,
bigSteve
Essentially a C programmer, I would like to know when an object should be instsantiated on the stack and when on the free store.
eg for class fred, we can create objects as follows:
fred myobject;
// use myobject
// myobject.function();
OR
fred myobject = new fred();
// use myobject
// myobject->function();
Can anyone giove some examples...
Thanks,
bigSteve