void MyFunc( void )
>{
>int i; // on the stack
>SomeClass o; // o the object reference o will be on the stack
>
>o = new SomeClass; // the actual object is on the heap
You cannot create an object using new if the object is on the stack! This should have been:
SomeClass* pO;
pO = new SomeClass;
Vlad