Quick C++ Question

Started by
1 comment, last by edd1986 17 years ago
Hiya, should be an easy one. I am converting one of my projects from C into C++. I have written a C++ class and am trying to create an object of that class using class = new class(etc) however this brings up error 2440, saying that it 'cannot convert from *class to class' I've checked and double checked my class code and it looks fine with no different structure to any other class I have written, I've never had this problem before when using C++ and I'm totally stumped. Any ideas? Thanks
Advertisement
Class* pClass = new Class();

new returns a pointer to the memory it allocates.
oh bloody hell how do I miss these things lol

Thanks (hangs head in shame)

This topic is closed to new replies.

Advertisement