Is there a binary parameter for 'setiosflags' ??? The output show that the decimal number and hex number print... But the binary parameter yields an off the wall answer.
Here is my code:
#include<stdio.h>
#include<ctype.h>
#include<iostream.h>
#include<stdlib.h>
#include<iomanip.h>
#define MAXSTRING 8
void main(void)
{
int number = 1001;
cout << setiosflags(ios::dec) << number << endl ;
cout << "\t"<< setiosflags(ios::hex)<< number << endl;
cout << "\t"<< setiosflags(ios::binary)<< number << endl;
exit(0);
}
Here is my output:
'1001'
'3e9'
'0x3e9'
thanks