#define ptr int*
and
typedef int* ptr;
#define is used for make a constant. The cosntant is whatever. no ";" included.
typedef is used for make a macro of the same type.
#define name "Lady Gaga"
#define id 12345
#define number int
typedef int number;
typedef number lol;
typedef "po" lola; // not valid
No comments:
Post a Comment