returning a formated string
- From: hswerdfe <hswerdfe@xxxxxxxxxxx>
- Date: Fri, 19 Aug 2005 13:23:07 -0400
I'm making a function that returns a formated String. my best attempt is shown but it does not work.
I think it does not expand out the "args" when it is passed in. is there a way to make CString::Format expand out the Arguments List?
p.s. if I should be using sprintf or something else like that, let me know also.
my DevEnv is MS VC++ 6
CString GetFormatedString(LPCTSTR fmt,...)
{
va_list args;
CString msg;va_start(args, fmt); msg.Format(fmt, args); va_end(args); return msg; }
cheers and thanks .
- Follow-Ups:
- Re: returning a formated string
- From: Igor Tandetnik
- Re: returning a formated string
- From: Doug Harrison [MVP]
- Re: returning a formated string
- Prev by Date: Re: returning a formated string
- Next by Date: DLL and its icon
- Previous by thread: LBUTTONDOWN LBUTTONUP selects text I don't want selected in a textbox
- Next by thread: Re: returning a formated string
- Index(es):
Relevant Pages
|