Tchar and %s %S

This is a discussion on Tchar and %s %S within the C Programming forums, part of the General Programming Boards category; If I use tchar to migrate my application (over 2000 source files) to wide character, I see that I can ...

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    13

    Tchar and %s %S

    If I use tchar to migrate my application (over 2000 source files) to wide character, I see that I can use tcsxxx functions to replace existing strxxx functions, I also noticed that there is this _TEXT macro that may be used for literal string declarations.

    But how do I write a tchar array using a format specifier?

    Is there something that I missed that will behave as %s when tchar is char and %S when tchar is wchar_t? How would I deal with this?

    MC

  2. #2
    Registered User
    Join Date
    Sep 2004
    Location
    California
    Posts
    3,265
    just use the tchar equivalent functions. For instance, instead of sprintf you would use _stprintf. Instead of printf, use _tprintf.

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21