How to change int to wxString?

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
candid_1120
Earned some good credits
Earned some good credits
Posts: 118
Joined: Sun Aug 28, 2005 8:42 am

How to change int to wxString?

Post by candid_1120 »

as title
jazz
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Jun 09, 2005 12:37 am
Contact:

Post by jazz »

Code: Select all

wxString mynumber;

wxString.Printf("%d", 12345);
As demonstrated.
[INSERT LAME SIG HERE]
Jorg
Moderator
Moderator
Posts: 3971
Joined: Fri Aug 27, 2004 9:38 pm
Location: Delft, Netherlands
Contact:

Post by Jorg »

Code: Select all

wxString number;

number << 2;
Also possible.

- Jorgen
Forensic Software Engineer
Netherlands Forensic Insitute
http://english.forensischinstituut.nl/
-------------------------------------
Jorg's WasteBucket
http://www.xs4all.nl/~jorgb/wb
Bundy
I live to help wx-kind
I live to help wx-kind
Posts: 153
Joined: Fri Apr 29, 2005 9:46 am
Location: Poland

Post by Bundy »

When some function need string as parameter and I have int I use:

Code: Select all

int my_int =5;  //example

some_function(wxString::Format("%d",my_int));
Regards
Bundy
"Fate rewards prepared mind"

Quote from movie "Liberator 2"
Post Reply