Pros and cons of using nested C++ classes and enumerations?

前端 未结 13 2174
悲&欢浪女
悲&欢浪女 2020-11-29 23:43

What are the pros and cons of using nested public C++ classes and enumerations? For example, suppose you have a class called printer, and this class also store

13条回答
  •  情深已故
    2020-11-30 00:15

    Only problem with nested classes that I bumped into yet was that C++ does not let us refer to the object of the enclosing class, in the nested class functions. We cannot say "Enclosing::this"

    (But maybe there's a way?)

提交回复
热议问题