I have a problem with malloc function.
I am using mallog in the manner:
TMyClass *ClInstancePtr; CInstancePtr=(TMyClass*) malloc(sizeof(TMyClass)*NumOfElements);And it doesn't work properly. It behaves just lke I hadn't allocated anything.
ClInstance=some values; cout<<ClInstance<<endl; output - some random data.What am I doing wrong?
Thanks in advance for any help.
PS.: When I use new[ ]/delete [ ] it works fine.