Hey all,
I'm gonna give you an example and an error and I'm gonna need to know A) Why I can't do it, B) How can I fix it?
So here goes..
I have:
Gemstone.cpp
class Gemstone( / Whatever / );
Init.cpp
void CreateStones(void)
{
Gemstone ruby;
}
Main.cpp
int main()
{
ruby.CheckValue();
}
Now the problem I'm having is, in main.cpp it says that ruby is an undeclared identifier and so it stops compiling.
But why? I declared it in init.cpp, why can't I use it in main.cpp?
(BTW, I also have header files for declaring the classes and functions, so thats not an issue I don't think)