If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Delphi, C etc > Needing help in C++.................. (hexadecimal)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-07-02, 17:39
Jessé Goncalves Jessé Goncalves is offline
Registered User
 
Join Date: Feb 2002
Location: Brazil
Posts: 8
Question Needing help in C++.................. (hexadecimal)

Hi, people...

I'm getting to Programming in C++, and I'm charging some difficulties! That's not about data access, but statements.

How could I get the hexadecimal value from some variable, like this:::

a = hex(49); 'this could return 31;

I realized that I could use sprintf to get this result, but the problem is... I can't put this into a fputc, that ask me an int value, and the sprintf answer me a char!!!

Could somebody give some help????
Reply With Quote
  #2 (permalink)  
Old 03-13-02, 19:55
alligatorsql.com alligatorsql.com is offline
Registered User
 
Join Date: Jul 2001
Location: Germany
Posts: 189
Hello,

Sorry, but I don´t understand why you can´t use sprintf or Format when you are using MFC

Can you please explain exactly, what you want to do ?

Greetings

Manfred Peter
(Alligator Company)
http://www.alligatorsql.com
Reply With Quote
  #3 (permalink)  
Old 12-13-02, 08:20
nathan_bee nathan_bee is offline
Registered User
 
Join Date: Dec 2002
Posts: 4
Re: Needing help in C++.................. (hexadecimal)

Quote:
Originally posted by Jessé Goncalves
Hi, people...

I'm getting to Programming in C++, and I'm charging some difficulties! That's not about data access, but statements.

How could I get the hexadecimal value from some variable, like this:::

a = hex(49); 'this could return 31;

I realized that I could use sprintf to get this result, but the problem is... I can't put this into a fputc, that ask me an int value, and the sprintf answer me a char!!!

Could somebody give some help????
Try fputs instead:

int fputs( const char *string, FILE *stream );

Nathano
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On