• Advertisement
Sign in to follow this  

[C++] Problem with new and custom class

This topic is 3800 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, im getting this error when I have a pointer array of my custom classes.
error C2679: binary '=' : no operator found which takes a right-hand operand of type 'Something *' (or there is no acceptable conversion)
And heres some sample code that will give the same type of error im getting, can anyone fill me in on what i need to do to resolve it. Thanks.
#include <stdio.h>

class Something
    Something(const int stuff);

void main()
    Something *stuff;

    stuff = new Something[10];

    stuff[0] = new Something(20);


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement