hey guys im having a bit of trouble making an string accessor to a private member string variable that i have declared:

Class A{

string getname() const;

string name;


Thats a little example. I have tried almost everything. I have included string class header in the class but still nothing. Any help would be greatly appreciated!

when i comment out the strings in the class it gives me a fatal link error. Fatal Link Error: Entry Must Be Defined...

fixed the linking problem...still have the string compiler is complaining a lot ><

Never mind fixed it...THanks guys

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.