I'm working on a school assignment. I have Wallet.h and Main.cpp In the Wallet.h I have a public:
static std::map<std::string, double> currencies;
and Wallet();
In Main.cpp I'm trying to use this currencies map as such:
std::map<std::string, double> currencies = wallet.currencies;`
I do not get any warnings in the code, but when I try to compile I get this error:
Undefined symbols for architecture x86_64: "Wallet::currencies", [...] ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm not sure what is wrong, probably it's not correct how I'm trying to use currencies. Can someone help?