I know it may seem like this has been asked before but I've looked around and the static method didn't work for me. Here's my code:
struct Customer {
public:
string get_name();
private:
string customer,first, last;
};
Here's where I call the function:
void creation::new_account() {
Customer::get_name(); //line it gives the error on.
}
Here's an example of some code that compiles fine.
struct Creation { public: string get_date(); private: string date; };
then I call it the same way
void Creation::new_account() { Creation::get_date();}
Hence my confusion why one works and the other doesn't.
EDIT: Ok I get it, I just realized I was calling a function of another struct inside a function definition that's part of a different class. I got it, thanks to all who answered