Original Post
Well I'm trying to learn C++ and break my C and java habits, So I've got this question, what's the equivelant of sprintf(string,"The total is $%.2f",total); in C++ using std:string? I know to do this in java you use the DecimalFormat Class to make the precision correct then just use the + operator to add the float to the string, but C++ doesn't seem to allow you to do this, so how is it done?