I got frustrated why my identifier is unidentified...or is there some other structural issue?
Due in 1 day, would be appreciated if can help me figure out what is the mistake.
Its a program to tell day of a week when input number between 1~7.
It has 3 files: main.cpp,demoClass.cpp, demoClass.h
in democlass.h put the following line (outside of any class definition):
extern string dayName [7];
dayName is defined in main.cpp, but you try to use it in democlass.cpp where it isn't visible. If you place the forward declaration in your .h file it'll tell the compiler that you're using a variable that is defined elsewhere when the .h file is included in democlass.cpp.