This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: can still be used, however, by specifying it via an "elaborated type specifier": struct A The same applies to other type names: class A a; union U u; enum E e; Taking advantage of this feature, that is, giving a class type and a variable or function the same name, isn't very good usage. It's supported for compatibility reasons with old C code; C puts structure tags (names) into a separate namespace, but C++ does not. Terms like "struct compatibility hack" and "1.5 namespace rule" are sometimes used to describe this feature....
View Full Document
- Fall '08
- class a, struct compatibility hack