c - _set_printf_count_output() appears broken under Windows 7 -
microsoft in infinite bloody wisdom have default disabled %n specifier in printf (and variants thereof).
you can re-enable function; _set_printf_count_output().
i have used - time ago in past - , worked.
now isn't working. platform latest sdk on windows 7.
anyone else finding this?
program:
int _tmain(int argc, _tchar* argv[]) { int count; _set_printf_count_output(1); printf( "1234567890123456%n78901234567890\n", &count); printf("%d\n", count); return 0; }
output:
123456789012345678901234567890 16
Comments
Post a Comment