From: Martin Ambuhl Newsgroups: alt.comp.lang.learn.c-c++,comp.os.msdos.djgpp Subject: Re: Where is ? Date: Wed, 19 May 1999 02:25:42 -0400 Content-Transfer-Encoding: 8bit References: <5xi03.345$UW4 DOT 518 AT news DOT get2net DOT dk> X-Posted-Path-Was: not-for-mail X-Accept-Language: en Content-Type: text/plain; charset=iso-8859-1 X-ELN-Date: 19 May 1999 06:24:30 GMT X-ELN-Insert-Date: Tue May 18 23:35:18 1999 Organization: Nocturnal Aviation Lines: 92 Mime-Version: 1.0 NNTP-Posting-Host: dialup-209.246.82.187.newyork2.level3.net Message-ID: <37425966.26045697@earthlink.net> X-Mailer: Mozilla 4.51 [en] (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com David List wrote: > > Iīm learning from Ivor Hortonīs "Beginning C++" and using djgpp with RHIDE. When I try out Mr. Hortonīs directions for getting the minimum and maximum size of types, I get an error message telling me: Error: limits: No such file or directory (ENOENI). Could someone please tell me what the reason for this could be? Here is the code that gives me this problem. It is almost the same as in Mr. Hortonīs 'Program 3.3': > > #include > #include > using namespace std; The problem is that djgpp does not yet have the new header. The closest you can come right now is to use the C++ version of the C header and C++ version of the C header. specifies a much larger number of values than do and , such as numeric_limits::is_signed, numeric_limits::has_infinity and so on. The appropriate and macros are shown interspersed with you code below. #include // the approximate workaround for #include // the missing header > > int main() > { > cout << "The data type char ranges from" > << numeric_limits::min() > << " to " > << numeric_limits::max() This will need to be << CHAR_MAX > << endl; > cout << "The data type short ranges from" > << numeric_limits::min() > << " to " > << numeric_limits::max() This will need to be << SHRT_MIN << " to " << SHRT_MAX > << endl; > cout << "The data type int ranges from" > << numeric_limits::min() > << " to " > << numeric_limits::max() << INT_MIN << " to " << INT_MAX > << endl; > cout << "The data type long ranges from" > << numeric_limits::min() > << " to " > << numeric_limits::max() << LONG_MIN << " to " << LONG_MAX > << endl; > cout << "The data type float ranges from" > << numeric_limits::min() > << " to " > << numeric_limits::max() << FLT_MIN << " to " << FLT_MAX // Note that these are both poitive values > << endl; > cout << "The data type double ranges from" > << numeric_limits::min() > << " to " > << numeric_limits::max() << DBL_MIN << " to " << DBL_MAX > << endl; > cout << "The data type long double ranges from" > << numeric_limits::min() > << " to " > << numeric_limits::max() << LDBL_MIN << " to " << LDBL_MAX > << endl; > > return 0; > } -- Martin Ambuhl (mambuhl AT earthlink DOT net) Note: mambuhl AT tiac DOT net will soon be inactive