Joshua
April 22nd, 1999, 02:36 PM
I'm working on a calculator type program. I want to add HEX, OCT, and BIN to change my answer into whichever button i press. What I'm trying to do is the conversion for these to happen. Since the whole program is written in C, I can't seem to do:
subtotal = bin(tempVal);
this ends up giving me 3 errors. I know that in C++ you can easily do:
cout<<hex<<tempVal;
but that can't seem to happen.
anyone have any ideas on how to help?? I'm just looking for the line of code that will convert my answer in BIN, HEX, or OCT. I know all the code around that part, it's just this one line of code i can't seem to get! any suggestions? Thanx!!
subtotal = bin(tempVal);
this ends up giving me 3 errors. I know that in C++ you can easily do:
cout<<hex<<tempVal;
but that can't seem to happen.
anyone have any ideas on how to help?? I'm just looking for the line of code that will convert my answer in BIN, HEX, or OCT. I know all the code around that part, it's just this one line of code i can't seem to get! any suggestions? Thanx!!