I just get an error whenever I run it. I keep saying "'user' : undeclared identifier
When I run it just with main + source file , it's perfectly fine.
Please help guys
The header file probably needs to declare the function prototype like this: std::string getname();
This is because by the time you #include the header file bandit.h you haven't reached the "using namespace std;" line yet.
And I tell you now: Adding "using" statements to header files is bad practice, so start getting used to qualifying names with their namespace inside header files.