I am writing a program that converts a hexadecimal number to a decimal number (without using the std::hex and std::dec stuff), and at one point need to change from a double to an int.. However when large numbers, such as 5,726,623,060.00000 are entered, they all get changed to -2,147,483,648 after being run through static_cast<int>... Any help as to how to get them to be converted correctly to (i.e 5,726,623,060.00000 to 5,726,623,060) would be very much appreciated!! Thanks!! :)
tofugamer 0 Newbie Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
tofugamer 0 Newbie Poster
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
tofugamer 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.