0

hi Guyz...
need some help here...
i want to input an integer but it can be either in hexadecimal form or in integer form.
the problem is that i would like to store that input in that particular form and separate all hexadecimal values in to an array.

for ex: if input is 0x3ff24e, then i want to create an array that stores the values 3,f,f,2,4,e in a an array of 6 variables.

now the problem is, as soon as i input the above number it gets converted into decimal form and hence i am unable to create an array of hexadecimal values??
so can someone please guide...

4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by John A
0

hi Guyz...
need some help here...
i want to input an integer but it can be either in hexadecimal form or in integer form.
the problem is that i would like to store that input in that particular form and separate all hexadecimal values in to an array.

for ex: if input is 0x3ff24e, then i want to create an array that stores the values 3,f,f,2,4,e in a an array of 6 variables.

now the problem is, as soon as i input the above number it gets converted into decimal form and hence i am unable to create an array of hexadecimal values??
so can someone please guide...

use a char * or string to read user input

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.