Define a struct inside a class in C++

后端 未结 6 1105
日久生厌
日久生厌 2020-12-13 03:42

Can someone give me an example about how to define a new type of struct in a class in C++.

Thanks.

6条回答
  •  醉话见心
    2020-12-13 04:00

    Something like this:

    class Class {
        // visibility will default to private unless you specify it
        struct Struct {
            //specify members here;
        };
    };
    

提交回复
热议问题