I need to separate the integer and fraction part from decimal like 4.343.
Do we have any function in C/C++ which gives the position of the decimal point. After getting that I guess we can convert to numbers using atoi function.
Thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If
4.343is a string, have a look atstrchr.Then you can use
atoias follow.