Nevermind.

Where do you have the declaration and definition of the first code box above? You most likely need to put the declaration (top line) into your class declaration with the friend keyword in front of it. Then just include the definition in your implementation file.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.