Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
116 views
in Technique[技术] by (71.8m points)

c++ - Complex class and pointer

I try to understand to many complex as class, as in this code example :

class System
{
    int info;

    public:
      System *parent;
      System() {info = 0; parent=0;}
};

class Window
{
    public:
      Window();
};

class SoftWindow : public Window
{
     protected:
       System *systemWindow;
       Window *parent;

     public:
       Softwindow();
};

In System *parent I would like to understand what it does mean this pointer object in the same class System? Same here in the class Softwindow for System *systewindow ? What it does mean two pointer System in separation from class ? Can I assign with the pointer System *systemWindow to pointer System *parent even from two different class ?

Thanks

question from:https://stackoverflow.com/questions/65831762/complex-class-and-pointer

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...