Hi ,
I have a structure that defines something for example personal information , I have this struct in my Globals.h file , something like this :
struct Persons{
int Age;
};
struct Persons{
QString Name;
QString Email;
int Age;
QString Gender;
};
To copy to clipboard, switch view to plain text mode
in Globals.cpp , I defined an array of this struct like this :
extern Persons myPers[100];
extern Persons myPers[100];
To copy to clipboard, switch view to plain text mode
now , I have to use this array everywhere of my application , in different Threads , but I can not , I am new in c++ and QT , but I have basic knowledge of c++ programming , is my array definition correct ? is my structure definition correct , what is the safe and right way to use this array ?
Best Regards,
Amir .
Bookmarks