check for decimal in numerical string
-
I have an input box that a user can enter in 4 characters like 1.34. I need to check if there is a decimal in the input string and truncate everything after the tenth place. Is there a C/C++ function that I can use for this? Thanks
-
I have an input box that a user can enter in 4 characters like 1.34. I need to check if there is a decimal in the input string and truncate everything after the tenth place. Is there a C/C++ function that I can use for this? Thanks
-
Using "Add memmer variable wizard", add a variable (Category=value) and set ‘Max chars’ to n. Or, DDV_MaxChars(pDX, yourVar, 10); -- modified at 3:50 Saturday 10th November, 2007
george.dumitru wrote:
sing "Add memmer variable wizard", add a variable (Category=value) and set ‘Max chars’ to n.
How does that find the "decimal in the input string and truncate everything after the tenth place"??? Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
I have an input box that a user can enter in 4 characters like 1.34. I need to check if there is a decimal in the input string and truncate everything after the tenth place. Is there a C/C++ function that I can use for this? Thanks
kani98 wrote:
I need to check if there is a decimal in the input string...Is there a C/C++ function that I can use for this?
Check out
strchr()
, or string::find(), orCString::Find()
.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
-
kani98 wrote:
I need to check if there is a decimal in the input string...Is there a C/C++ function that I can use for this?
Check out
strchr()
, or string::find(), orCString::Find()
.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne