944,164 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 432
  • C++ RSS
Oct 5th, 2009
0

Hexadecimal Blues!!!!

Expand Post »
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...
Similar Threads
Reputation Points: 8
Solved Threads: 0
Junior Poster in Training
ayan2587 is offline Offline
60 posts
since Jul 2009
Oct 5th, 2009
0

Re: Hexadecimal Blues!!!!

Look at your other post. And don't double post. Be patience.
Reputation Points: 840
Solved Threads: 594
Senior Poster
firstPerson is offline Offline
3,865 posts
since Dec 2008
Oct 6th, 2009
0
Re: Hexadecimal Blues!!!!
Click to Expand / Collapse  Quote originally posted by ayan2587 ...
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
Reputation Points: 121
Solved Threads: 61
Posting Pro in Training
dkalita is offline Offline
402 posts
since Sep 2009
Oct 6th, 2009
1
Re: Hexadecimal Blues!!!!
Team Colleague
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
John A is offline Offline
5,055 posts
since Apr 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
This thread is currently closed and is not accepting any new replies.
Previous Thread in C++ Forum Timeline: Using pointers to strip sentence of spaces
Next Thread in C++ Forum Timeline: Use a for loop to read in numbers and add them





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC