hey anyone know what the largest value that can be stored in an integer variable is? likewise is there a double / long type of deal that isnt of float type? thanks
#include <iostream>
#include <limits>
int main(void)
{
std::cout << std::numeric_limits<int>::max() << std::endl;
std::cout << std::numeric_limits<double>::max() << std::endl;
return 0 ;
}
/* my output
2147483647
1.79769e+308
*/
Dave Sinkula
long time no c
5,058 posts since Apr 2004
Reputation Points: 2,780
Solved Threads: 314
well the project is for a intro level c++ class , so it seems like the prof wouldnt require us to do soemthin that required libraries other than the ones in code warrior to start with. im thinkin im gonna have to store the value as a character array and only convert it to actual numbers when i need to manipulate them, that way i dont have to deal w/ the whole thing as one huge number, jus go one slot at a time thru the array. thanks alot for speedy replies by the way
Yep, that's why we make assignments like that.
vmanes
Posting Virtuoso
1,914 posts since Aug 2007
Reputation Points: 1,268
Solved Threads: 228