typedef and struct inside class definition?

additionally.

typedefs defined inside a class are "part of the class", that is to say the typedef isn't visible/accessible outside the class functions unless you fully qualify it by class::typedefname
Additionally the typedef is also public, protected or private depending so it's access is also restricted to code outside the class.

The C++ template library makes heavy use of typedefs to achieve all sorts of handy features.

posted @ 2024-11-12 11:46  ChrainY  阅读(3)  评论(0编辑  收藏  举报