delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/08/10/12:04:56

Date: Sat, 8 Aug 92 13:31:31 -0700
From: Hassan Saleh <salehh AT atlantis DOT CS DOT ORST DOT EDU>
To: djgpp AT sun DOT soe DOT clarkson DOT edu

I just download djgpp 1.07 and was testing the following code
=============================================================
#include <iostream.h>

char ch = 'a';

main ()
{

	cout << hex(ch);
}

============================================================

I get the following compiler error:

test.cc: In function `int  main ()':
test.cc:8: bad argument 0 for function `ios::ios (struct streambuf*)'
           (type was char )

Is this not the right way to convert a character to a hexadecimal
value ?

H. I. SALEH
salehh AT atlantis DOT cs DOT orst DOT edu

- Raw text -


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