The natural way to define a member variable is (...)
No, that's not right at all. Your example is only a declaration of an incomplete type. You cannot do anything with it except.... Define a pointer to the incomplete type, and use that to keep the type definition hidden.
That technique is called pointer to implementation - pimpl. The thing you're complaining about?
Comments
No, that's not right at all. Your example is only a declaration of an incomplete type. You cannot do anything with it except.... Define a pointer to the incomplete type, and use that to keep the type definition hidden.
That technique is called pointer to implementation - pimpl. The thing you're complaining about?
OK, set me right. How do you declare a member variable "m" of type "Complextype" in C++?