cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
Datatypes
Datatypes
Apr 22, 2014 at 12:21pm UTC
EmbeddedG
(1)
Which datatype is to be use to decleare integer no having length 45 digits?
Apr 22, 2014 at 12:41pm UTC
Mats
(1398)
You could store the number in an array or consider using a library that allows large numbers, the best library for which is probably GMP, although other libraries do exist.
https://gmplib.org/#WHAT
Apr 22, 2014 at 2:12pm UTC
TwilightSpectre
(1392)
As another suggestion, if you don't mind losing precision, you can also store your data in a
double
.
Topic archived. No new replies allowed.