www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/19/07:31:09

From: "David List" <davidlist AT get2net DOT dk>
Newsgroups: alt.comp.lang.learn.c-c++,comp.os.msdos.djgpp
Subject: Where is <limits>?
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <5xi03.345$UW4.518@news.get2net.dk>
Date: Tue, 18 May 1999 20:39:54 +0200
NNTP-Posting-Host: 195.82.217.14
X-Complaints-To: abuse AT get2 DOT net
X-Trace: news.get2net.dk 927052993 195.82.217.14 (Tue, 18 May 1999 20:43:13 MET DST)
NNTP-Posting-Date: Tue, 18 May 1999 20:43:13 MET DST
Organization: get2net Internet Kunde
Lines: 56
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id HAB20672
Reply-To: djgpp AT delorie DOT com

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 <iostream>
#include <limits>
using namespace std;

int main()
 {
  cout << "The data type char ranges from"
       << numeric_limits<char>::min()
       << " to "
       << numeric_limits<char>::max()
       << endl;
  cout << "The data type short ranges from"
       << numeric_limits<short>::min()
       << " to "
       << numeric_limits<short>::max()
       << endl;
  cout << "The data type int ranges from"
       << numeric_limits<int>::min()
       << " to "
       << numeric_limits<int>::max()
       << endl;
 cout << "The data type long ranges from"
       << numeric_limits<long>::min()
       << " to "
       << numeric_limits<long>::max()
       << endl;
 cout << "The data type float ranges from"
       << numeric_limits<float>::min()
       << " to "
       << numeric_limits<float>::max()
       << endl;
 cout << "The data type double ranges from"
       << numeric_limits<double>::min()
       << " to "
       << numeric_limits<double>::max()
       << endl;
 cout << "The data type long double ranges from"
       << numeric_limits<long double>::min()
       << " to "
       << numeric_limits<long double>::max()
       << endl;

 return 0;
}

-- 
Med venlig hilsen/Best regards
David List

- Raw text -


  webmaster     delorie software   privacy  
  Copyright Đ 2019   by DJ Delorie     Updated Jul 2019