Where Can i found information on determining the largest positive, whole value that a int, unsigned int, long, unsigned long, float, and double can hold?
Printable View
Where Can i found information on determining the largest positive, whole value that a int, unsigned int, long, unsigned long, float, and double can hold?
In limits.h.
Code:#include <iostream>
#include <limits>
using namespace std;
int main(void)
{
numeric_limits<double> doubleLim;
cout<<doubleLim.max()<<endl;
cout<<numeric_limits<double>::is_signed;
//...etc
}
does not compile in linux
Code:#include <iostream>
#include <limits>
using namespace std;
int main(void)
{
numeric_limits<double> doubleLim;
cout<<doubleLim.max()<<endl;
cout<<numeric_limits<double>::is_signed;
Show us the errors. Our psychic abilities do have limits. And you might want to add an } at the end.