How to convert string to currency type.
Not sure what you mean by currency type.
Do you mean adding a currency's symbol to a string?
eg:
if you have a string with "56.09" in it, then you make it "£56.09"?
Explain more about what you mean by that.
Aceix.
You may need to format the string.
Dear Aceix,
thanx for your valuable reply. yeah i want to do exactly as according to your example. how it is possible. thanx in advance.
1 2 3
|
std::string str1 = "56.09";
std::string str2 = "£" + str1;
std::cout << str2 << std::endl; // prints £56.09
|
Last edited on
Last edited on