Laurent W
December 9th, 2003, 06:56 AM
How to use String::Format with multi parameters.
I want to convert
CString toto;
toto.Format("My String %s %s %s %02d %6.2lf", myStr1, myStr2, myStr3,myint,myDouble);
to
String *toto;
toto = String::Format ("My String {0} {1} {2} {3} {4}",myStr1, myStr2, myStr3,__box(myint), __box (myDouble) );
If i do that, firstly i have an compilation error saying there is too much parameters for String::Format. Secondely, I don't how to replace %02d or %6.2lf by the equivalent format parameters for String.
:confused:
Any help will be welcome
I want to convert
CString toto;
toto.Format("My String %s %s %s %02d %6.2lf", myStr1, myStr2, myStr3,myint,myDouble);
to
String *toto;
toto = String::Format ("My String {0} {1} {2} {3} {4}",myStr1, myStr2, myStr3,__box(myint), __box (myDouble) );
If i do that, firstly i have an compilation error saying there is too much parameters for String::Format. Secondely, I don't how to replace %02d or %6.2lf by the equivalent format parameters for String.
:confused:
Any help will be welcome