a problem about typedef keyword

Will you please explain me following typedef:

typedef WCHAR TCHAR, *PTCHAR, PTSTR;

(Term means: WCHAR – wide character
TCHAR – generic character
*PTCHAR – pointer to generic character
PTSTR – pointer to generic string. )

Will you please explain me how i can get this typedef and how can i use this typedef.
The typedef is equivalent to:

1
2
3
typedef WCHAR TCHAR;
typedef WCHAR *PTCHAR;
typedef WCHAR PTSTR; //Which I think is a typo.  You probably meant *PTSTR. 


You use TCHAR when declaring chars or arrays of chars for use with the generic Windows API functions, and you use PTCHAR and PTSTR (corrected as above) whenever you need pointers to arrays of generic chars.
Thank you very much . I got .
Topic archived. No new replies allowed.