typedef struct host host;
Of course, I recommend much longer struct names since C namespace is so limiting. I usually name my stuff with a project identifier prefix, like struct myproj_host. I find CamelCase and lowercase equally appealing for the prefix and object names, but tend to stick to one pattern per project. I often put a suffix of _t on my typedefs, and _p on pointer typedefs, but that would also make the CTL library generate ugly code. Whoops I just looked it up, and "_t" are reserved. So I guess I won't do that anymore. Sometimes I don't declare any typedefs and just live with 'struct' declared everywhere. It isn't pretty, but C is never really pretty and it helps document the code for people less familiar with it. I suppose the typedefs are required for that library you're using though, and with it putting prefixes on your type names for the container name that is only going to look OK with lowercase...
Maybe if the CTL library were written in cpppp it would be easier to parameterize the output :-)
(that vector class isn't finished; but maybe CTL would make a good model to base my eventual set of standard templates on)
In reply to Re^5: OT: Why does malloc always give me 24?
by NERDVANA
in thread OT: Why does malloc always give me 24? [SOLVED]
by karlgoethebier
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |