2 ms·
> why isn't the C equivalent here just "struct Foo"? That would not be the equivalent... you would then need to declare the type of Foo variables as: stru
by brabel 4y ago
> why isn't the C equivalent here just "struct Foo"?
That would not be the equivalent... you would then need to declare the type of Foo variables as:
struct Foo myVar;
With the typedef, and I assume with C3, you would do the more acceptable:
Foo myVar;
- addaon 4y agoFrom the primer, C3 follows the C++ rules here, not C rules. Changing to using C++ struct/enum/union naming rules here is a much less invasive change than what I'm discussing.