Click here to Skip to main content
15,919,336 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about swprintf and _stprintf Pin
George_George2-May-06 22:05
George_George2-May-06 22:05 
GeneralRe: about swprintf and _stprintf Pin
Stephen Hewitt2-May-06 22:09
Stephen Hewitt2-May-06 22:09 
GeneralRe: about swprintf and _stprintf Pin
George_George2-May-06 22:18
George_George2-May-06 22:18 
GeneralRe: about swprintf and _stprintf Pin
Stephen Hewitt2-May-06 23:23
Stephen Hewitt2-May-06 23:23 
GeneralRe: about swprintf and _stprintf Pin
George_George3-May-06 2:23
George_George3-May-06 2:23 
AnswerRe: about swprintf and _stprintf Pin
Michael Dunn2-May-06 22:54
sitebuilderMichael Dunn2-May-06 22:54 
GeneralRe: about swprintf and _stprintf Pin
George_George2-May-06 23:19
George_George2-May-06 23:19 
GeneralRe: about swprintf and _stprintf Pin
Michael Dunn2-May-06 23:27
sitebuilderMichael Dunn2-May-06 23:27 
Now that I looked more closely at your question Blush | :O I see where the confusion is coming from. %s means a string of TCHARs, so that will change between ANSI and Unicode builds. The ... in a parameter list means "any number of parameters of any type" - it's totally unrelated to the character set you're building with, but the format string does have to take character sets into account:
TCHAR sz[100];
_stprintf(sz, _T("Hello %hs"), "Bob");
Note that I used %hs to mean an ANSI string.


--Mike--
Visual C++ MVP Cool | :cool:
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
GeneralRe: about swprintf and _stprintf Pin
George_George3-May-06 2:37
George_George3-May-06 2:37 
GeneralRe: about swprintf and _stprintf Pin
Michael Dunn3-May-06 7:28
sitebuilderMichael Dunn3-May-06 7:28 
GeneralRe: about swprintf and _stprintf Pin
George_George3-May-06 20:09
George_George3-May-06 20:09 
QuestionHow to create .iso file... Pin
nagamohan_p2-May-06 21:36
nagamohan_p2-May-06 21:36 
AnswerRe: How to create .iso file... Pin
nguyenvhn2-May-06 22:11
nguyenvhn2-May-06 22:11 
GeneralRe: How to create .iso file... Pin
nagamohan_p3-May-06 10:45
nagamohan_p3-May-06 10:45 
QuestionCommand line invovation Pin
anithavikram(manisha)2-May-06 21:18
anithavikram(manisha)2-May-06 21:18 
AnswerRe: Command line invovation Pin
Quaker3222-May-06 21:30
Quaker3222-May-06 21:30 
Questionstorage for reference variable Pin
voorugonda prashanth2-May-06 21:04
voorugonda prashanth2-May-06 21:04 
AnswerRe: storage for reference variable Pin
Cedric Moonen2-May-06 21:10
Cedric Moonen2-May-06 21:10 
GeneralRe: storage for reference variable Pin
voorugonda prashanth2-May-06 21:30
voorugonda prashanth2-May-06 21:30 
AnswerRe: storage for reference variable Pin
toxcct2-May-06 21:37
toxcct2-May-06 21:37 
GeneralRe: storage for reference variable Pin
Justin Tay2-May-06 21:43
Justin Tay2-May-06 21:43 
GeneralRe: storage for reference variable Pin
voorugonda prashanth2-May-06 22:31
voorugonda prashanth2-May-06 22:31 
GeneralRe: storage for reference variable Pin
Justin Tay2-May-06 22:45
Justin Tay2-May-06 22:45 
AnswerRe: storage for reference variable Pin
kumar_mk12-May-06 3:50
kumar_mk12-May-06 3:50 
QuestionList Box for displaying active users in a LAN Pin
mad_john2-May-06 21:01
mad_john2-May-06 21:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.