zorro68
5th October 2007, 21:42
Hi. I want to define a global class variable. I have defined in my main.cpp this:
IDIOMA lang; //IDIOMA is the class name.
and then in other .cpp I have write:
extern IDIOMA lang;
I have no compiler error and no linker error, but when i used some member of lang is empty (lang.number for example).
What happend? How can I defined a global class variable that i can used in all modules of my programm?
Thanks
IDIOMA lang; //IDIOMA is the class name.
and then in other .cpp I have write:
extern IDIOMA lang;
I have no compiler error and no linker error, but when i used some member of lang is empty (lang.number for example).
What happend? How can I defined a global class variable that i can used in all modules of my programm?
Thanks