register_printf_function / Visual C++
Does the function register_printf_function() (Or an equivalent function) exist in Visual C?
I''m using a custom string type (int len, char *chars), and I want to be able to print this using printf, something similar to "%s".
Here''s the page that I got from googling on custom format specifications:
http://www.gnu.org/manual/glibc-2.2.5/html_node/Registering-New-Conversions.html#Registering%20New%20Conversions
It says register_printf_function is ISO C (Is this similar to ANSI C?), but MSDN seems not to know about it.
Would vprintf (or any variant of it) be ok ?
MSVC has it as _vprintf.
[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
MSVC has it as _vprintf.
[ Start Here ! | How To Ask Smart Questions | Recommended C++ Books | C++ FAQ Lite | Function Ptrs | CppTips Archive ]
[ Header Files | File Format Docs | LNK2001 | C++ STL Doc | STLPort | Free C++ IDE | Boost C++ Lib | MSVC6 Lib Fixes ]
quote:It says register_printf_function is ISO C (Is this similar to ANSI C?), but MSDN seems not to know about it.
Er no it doesn''t.
It says the opposite:
Portability Note: The ability to extend the syntax of printf template strings is a GNU extension. ISO standard C has nothing similar.
Anyway, the answer is, no, it doesn''t. You''ll have to write your own printf from scratch. This is another reason why C is rather lacking.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement