Click here to Skip to main content
16,007,687 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: Casting of a Object * to a Enum value question?? Pin
araelgig3-Feb-04 1:08
araelgig3-Feb-04 1:08 
GeneralLNK2005 Error. Pin
adarsh_sebiz1-Feb-04 19:05
adarsh_sebiz1-Feb-04 19:05 
GeneralRe: LNK2005 Error. Pin
Mike Dimmick2-Feb-04 2:36
Mike Dimmick2-Feb-04 2:36 
GeneralRe: LNK2005 Error. Pin
adarsh_sebiz10-Feb-04 1:46
adarsh_sebiz10-Feb-04 1:46 
Generalargument and matrix Pin
Dheeraj Mehta1-Feb-04 18:10
Dheeraj Mehta1-Feb-04 18:10 
Questionset /clr option in MFC application? Pin
scoct31-Jan-04 21:10
scoct31-Jan-04 21:10 
Generalreading inputs Pin
Liyana30-Jan-04 12:13
Liyana30-Jan-04 12:13 
GeneralRe: reading inputs Pin
Roger Wright3-Feb-04 4:25
professionalRoger Wright3-Feb-04 4:25 
You're not getting much response to this, are you?Smile | :) Okay, though I'm a beginner, too, I'll take a crack at it...

First, to read the file you can use fopen and streams, or CFile and a character buffer. Streams make me crazy, so I don't use them yet, but you may have better luck with them.

Converting the individual characters to integer values is easy. Use isdigit(ch) on each character read to find out whether it's in the range 0 to 9. If it is, use atoi(ch) to return the value as an integer. For characters A to F, I'd first check using isalpha(ch) to filter out carriage returns and such, then apply toupper(ch) to make them upper case, then a Select (oops) Switch statement to set the values (case 'A': value=10; case 'B':value=11; etc).

Combining two input characters into a one byte hex number is straighforward, I think. I'd try taking the first int value and shift it left (value<<4) by four bits, then add the second value to it. The lower byte of the int result should be the binary value you're looking for.

As for the rest - I don't understand the question well enough to guess. Could you clarify what you're trying to do with the array thingy?

As I said, I'm a beginner too, so any of the above may be entirely wrong. But that's the approach I'd start with, then let the many error messages that result lead me to a correct solution. Hopefully this is enough to get you started. Good luck!Big Grin | :-D

Heard in Bullhead City - "You haven't lost your girl -
you've just lost your turn..." [sigh] So true...
GeneralRe: reading inputs Pin
Nik Vogiatzis18-Feb-04 17:22
Nik Vogiatzis18-Feb-04 17:22 
GeneralC++ and Database Pin
vin29-Jan-04 19:22
vin29-Jan-04 19:22 
GeneralRe: C++ and Database Pin
Selvam R2-Feb-04 6:31
professionalSelvam R2-Feb-04 6:31 
GeneralVirtual destructor causes LNK2001 !!! Pin
balkanese27-Jan-04 22:18
balkanese27-Jan-04 22:18 
Generalswfsource: wanted code regarding creating buttons, please help! Pin
adarsh_sebiz26-Jan-04 23:29
adarsh_sebiz26-Jan-04 23:29 
Questionlicensed control? Pin
Roger Alsing26-Jan-04 22:56
Roger Alsing26-Jan-04 22:56 
QuestionHow can I get the name of current theme from OS? Pin
rafamarmar25-Jan-04 5:36
rafamarmar25-Jan-04 5:36 
Questionclass wide arrays? Pin
paulcsf24-Jan-04 12:40
paulcsf24-Jan-04 12:40 
GeneralServer 2003 DDK, ZMODEM Pin
Shahin7723-Jan-04 6:42
Shahin7723-Jan-04 6:42 
GeneralRegistering Key events when minimized Pin
Tank_Aviator22-Jan-04 18:22
Tank_Aviator22-Jan-04 18:22 
GeneralUsing old STRUCTs in managed classes Pin
Nik Vogiatzis21-Jan-04 19:47
Nik Vogiatzis21-Jan-04 19:47 
GeneralDeclaring indexed property in C++ Class Library Pin
fin21-Jan-04 12:51
fin21-Jan-04 12:51 
GeneralMystery solved Pin
fin21-Jan-04 17:23
fin21-Jan-04 17:23 
GeneralConverting a Byte[ ] into a User Defined Structure Pin
olstuff21-Jan-04 6:46
sussolstuff21-Jan-04 6:46 
GeneralRe: Converting a Byte[ ] into a User Defined Structure Pin
toxcct27-Jan-04 3:57
toxcct27-Jan-04 3:57 
GeneralDynamically invoking classes Pin
Tank_Aviator20-Jan-04 12:49
Tank_Aviator20-Jan-04 12:49 
GeneralRe: Dynamically invoking classes Pin
Nik Vogiatzis21-Jan-04 19:41
Nik Vogiatzis21-Jan-04 19:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.