Declaration is incompatible with type

You need to

#include <string>

in your bankAccount header file, and refer to the strings as std::string.

#ifndef H_bankAccount;
#define H_bankAccount;

#include <string>

class bankAccount
{
public:
    std::string getAcctOwnersName() const;

   ....

once it is included in the header, you no longer need to include it in the implementation file.

Leave a Comment