2

I am writing a smart contract for use within the EOSIO system contract. I am receiving this error message multiple times:

constructor for 'eosio::multi_index<13510798882111488, BP>::item' must explicitly initialize the base class 'BP' which does not have a default constructor

I have checked my constructors and they are all correct - is there something I'm missing?

2

You may have written several constructors for your BP class, but do you have a default constructor?

All classes that are to be used as multi_index arrays require that the class has a default constructor, even if it is blank.

The default constructor for BP would look like:

class BP
{
// Your stuff here

public:
  BP(){/* Your default constructor here */}
};
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.