Fprintf VS _ftprintf

both have almost the same input parameters:

int _ftprintf( FILE *stream, const _tchar *format [, argument ]...)

int fprintf(FILE *stream, const char *format, ...)

What is the difference between the two formats? When should I use each?

+4
source share
1 answer

_tprintfand _ftprintfshould be used with format strings TCHAR. TCHARis just a macro that is unpacked into charor wchar_t, depending on whether the macro is set _UNICODE.

So basically, if you don’t have it _UNICODE, it _ftprintfwill be equivalent fprintf, otherwise it will be equivalent fwprintf.

+4
source

Source: https://habr.com/ru/post/1629148/


All Articles