Format int in C
-
Hi all :) I have a problem to formatted an int to the special format example : Int exp_int = 5640100; a need writes the integer to 5 640 100
-
Hi all :) I have a problem to formatted an int to the special format example : Int exp_int = 5640100; a need writes the integer to 5 640 100
I'll tell you what you should do... but not how (you can look that up). 0.Load your integer to a string. 1.Every third character (right to left), insert a space. 2.Finish parsing loop when you have less than or equal to three characters left.
-
Hi all :) I have a problem to formatted an int to the special format example : Int exp_int = 5640100; a need writes the integer to 5 640 100
Have you looked at the
GetNumberFormat()
function? You can format numbers based on a specific locale, or a custom format (e.g., using a space as the thousand separator)."One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Hi all :) I have a problem to formatted an int to the special format example : Int exp_int = 5640100; a need writes the integer to 5 640 100