I need some help, heh, i have to store a twelve digit number somewhere... as i've understood it nothing like unsigned int or long double or anything won't work :-/ have i missed something? or can anyone point me to anything which i can use to be able to do this?... i have to be able to performe calculations on that number too... :-/
i'm using c++ by the way.
Mr A 0 Newbie Poster
Recommended Answers
Jump to PostI need some help, heh, i have to store a twelve digit number somewhere... as i've understood it nothing like unsigned int or long double or anything won't work :-/ have i missed something? or can anyone point me to anything which i can use to be able to do …
Jump to PostWhy can't you use a double?
double n = 123456789012.0;
A double on most machines is at least 64 bits, so there should be plenty of accuracy.
If you must use an integer, some systems (MS VC++ for example) support 64-bit integers. In VC it goes like …
Jump to PostNever tried mingw. You might look in your help files for '64' or something and see if they support 64 bit integers or floating point numbers.
All 10 Replies
The Code Poet 0 Newbie Poster
Mr A 0 Newbie Poster
The Code Poet 0 Newbie Poster
Mr A 0 Newbie Poster
The Code Poet 0 Newbie Poster
Mr A 0 Newbie Poster
Chainsaw 12 Posting Pro in Training
Mr A 0 Newbie Poster
Chainsaw 12 Posting Pro in Training
The Code Poet 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.