I have a struct as a private member of my main Window class, like so:
{
Q_OBJECT
public:
//etc
private:
//etc
struct Comp {
short dataNUM_TOTc;
char *lyBuName[24];
bool onMA[24];
short dataTYPE[24];
} comp[7];
class Window : public QWidget
{
Q_OBJECT
public:
//etc
private:
//etc
struct Comp {
short dataNUM_TOTc;
char *lyBuName[24];
bool onMA[24];
short dataTYPE[24];
} comp[7];
To copy to clipboard, switch view to plain text mode
The values of the instances of the struct, comp[0-6], are initialized through a member function of the Window class and determine how my QWidgets are set up. I would like to be able to access (read) the values of this struct in the constructor function of another class, defined in another .cpp file. How to do this?
edit: Actually, I've no reason to make it private, so assume it's public instead of private.
Bookmarks