Originally Posted by
Overworked_PhD
I said something that was rather offensive, that's why the nice mod came in and edited this post for me. I promise not to do the same again.
Dude, LaserLight may be many things but she is no ones moron. She may be opinionated (aren't we all on here though?) but I would not presume to argue with her on the C or C++ standard. Heck I have been doing this for a couple of decades and I don't keep up on it they way she (and others on here do). well except the parts that interest me but that is a digression. Just sayin.
As for the typedef business on the one hand it can serve to save keystrokes but on the other hand it can also make code more readable. Consider:
Code:
struct TTicket
{
int cost;
char *destination;
};
int main(int argc, char *argv[])
{
struct TTicket newTicket;
...
}
Versus:
Code:
typedef struct TTicket
{
int cost;
char *destination;
}trainTicket;
int main(int argc, char *argv[])
{
trainTicket newTicket;
...
}
Note: I did the above pre-coffee so it may not compile but the point should be obvious.