Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法在 C++ 中使用通用数据类型,自动缩放到使用的数字类型?如果需要存储所有数字,它只使用短整数,如果使用大数字,则更改为长整数,等等?
If you are looking for speed, i don't recommend you a scalable variable usage in C++ but if you need flexibility instead of speed, here is your possible solution.
http://gmplib.org/