简体   繁体   中英

Is there a built in way to do non floating point decimal operations in c++?

I think the title describes what I want well enough, but is there a way to do arithmetic on numbers with decimals without using floats?

Is there a built in way to do non floating point decimal operations in c++?

No, there are no fixed point arithmetic types built in C++. Only built in arithmetic types are integers, and floating point. There are no classes for representing fixed point types in the standard library either.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM