分类: C/C++
2011-03-30 22:23:11
typedef
char *String_t; |
s1, s2, and s3 are all declared as char *, but s4 is
declared as a char, which is probably not the intention.
#defines do have the advantage that #ifdef works on
them . On the other
hand, typedefs have the advantage that they obey scope rules (that is, they can
be declared local to a function or block).