[Solved] What is this header error caused by? [closed]


I’m going to go out on a limb and guess that your class is defined something like this:

class Sales_item
{
    std::string isbn;
}

Classes and structs have public, private, and protected labels for their member data, and classes have their members labelled as private by default. You should change it to read:

class Sales_item
{
    public:
        std::string isbn;
}

EDIT:

When you add () (with or without parameters) to an identifier, you are telling the compiler to call it like a function. Take out the ()’s and your code should work.

6

solved What is this header error caused by? [closed]