Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Krylloan

register_printf_function / Visual C++

This topic is 5387 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!