typedef struct {int x, int y} Pair;
For struct and class, the struct/class name is between the struct/class keywork and the opening '{'.
In C++ whenever the name of the thing is left off, the thing is said to be anonymous. Here are are some other things that can be anonymous: enums, unions, variables (e.g. return (1+2);), arrays, functions (aka functors).
Reference: C++ Templates
No comments:
Post a Comment