I am having trouble with my program that's suppose to model a periodic table.
Here is the code for my program so far. What I am trying to do is ask the user for the abbreviation of the element and base on his abbreviation my program will output the information for that given element.I have put comments on the parts that I believe are causing my problems but don't know how to go about fixing them. I will appreciate it if you guys can point me in the right direction. The error that I am getting is error LNK2019: unresolved external symbol "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall periodic::GetAbbr(void)" (?GetAbbr@periodic@@QAE?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ) referenced in function _main
int m_natomic_number[1];
double m_natomic_weight[1];
int m_nelectron[1];
string m_nabbr[1];
string m_nname[1];
What?! Do you understand what declaring something as T a[1]; does? It declares a as a pointer to a static T. It's pointless, adds one unnecessary level of indirection, and should be replaced by T a;. If you do so, be sure to also change everything in this form: a[0] to this form: a
You didn't implement string periodic::GetAbbr(). That's what's causing the linker error. The linker error is pretty clear, actually. In a cryptic kind of way.