delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/29/05:11:28

From: igneous1 AT my-deja DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: bitset<8*sizeof(int)>b = i;
Date: Wed, 29 Mar 2000 08:24:55 GMT
Organization: Deja.com - Before you buy.
Lines: 21
Message-ID: <8bsekb$6pt$1@nnrp1.deja.com>
NNTP-Posting-Host: 166.62.205.115
X-Article-Creation-Date: Wed Mar 29 08:24:55 2000 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
X-Http-Proxy: 1.1 x28.deja.com:80 (Squid/1.1.22) for client 166.62.205.115
X-MyDeja-Info: XMYDJUIDigneous1
To: djgpp AT Delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

i expected this to print 1 through 10 in binary
however it didnt even compile
I have found that its not compiling in DJGPP. Any idea why?
#include <iostream>
#include <bitset>
using namespace std;
void binary(int i)
{
bitset<8*sizeof(int)>b = i;
cout<< b << "\n";
}
int main()
{
for(int i = 0; i < 11; i++)
binary(i);
return 0;
}


Sent via Deja.com http://www.deja.com/
Before you buy.

- Raw text -


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