wxString - writing values into strings
Carsten A. Arnholm
arnholm at offline.no
Sun Feb 10 11:02:35 PST 2008
raananb wrote:
> The example given in wxWidgets documentation
>
> wxString s;
> s.Printf("...%d", n);
>
> does not compile with VC++, which requires a cast to wxChar*,
> according to the specifications of both Printf & Format. It does
> compile with Watcom C++.
Hi,
Have you tried
wxString s;
s.Printf(wxT("...%d"), n);
I have similar statements that work fine on my Windows VC++ 2005 (ANSI
build) and GCC Linux (Unicode build).
> IMHO it would be useful to have wxString as specifier of the first
> argument, since this is what is passed even in the example...
I think what you are passing is a "const char*"
--
Carsten A. Arnholm
http://arnholm.org/
N59.776 E10.457
More information about the wx-users
mailing list