Click here to Skip to main content
16,006,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow do I use slider control in VC6? Pin
gamerPotatoe23-Dec-03 3:37
gamerPotatoe23-Dec-03 3:37 
AnswerRe: how do I use slider control in VC6? Pin
David Crow23-Dec-03 4:24
David Crow23-Dec-03 4:24 
GeneralConvert an int to char array rep Pin
Anonymous23-Dec-03 2:58
Anonymous23-Dec-03 2:58 
GeneralRe: Convert an int to char array rep Pin
Ian Darling23-Dec-03 3:28
Ian Darling23-Dec-03 3:28 
GeneralRe: Convert an int to char array rep Pin
Anonymous23-Dec-03 4:21
Anonymous23-Dec-03 4:21 
GeneralRe: Convert an int to char array rep Pin
nde_plume23-Dec-03 4:19
nde_plume23-Dec-03 4:19 
GeneralRe: Convert an int to char array rep Pin
Anonymous23-Dec-03 4:25
Anonymous23-Dec-03 4:25 
GeneralRe: Convert an int to char array rep Pin
nde_plume23-Dec-03 9:08
nde_plume23-Dec-03 9:08 
There are couple of issues you should be concerned with here.
First of all, you need to send the integer in a representation
that all readers will accept. As you probably know, different
processor achitectures represent integers in different ways,
consequently, most likely the best representation would be a
simple ASCII stringL

void convertMe(int i)
{
char s[MAX_CHAR];
itoa(i, s, 10);
sendBytes(s);
}

where sendBytes is your sending function. If you don't care about
endian-ness, you could also send the bytes directly like this:

sendBytes(reinterpret_cast<char*>(&i), sizeof(i));

However this assumes that sendBytes is not designed to send a string,
but a block of memory (hence the second parameter which is the length
of the block to send.) If it is designed to send strings it will
fail quite often since any zero byte within the integer will terminiate
the string.

GeneralRe: Convert an int to char array rep Pin
David Crow23-Dec-03 4:28
David Crow23-Dec-03 4:28 
GeneralChart Solutions Pin
Monty223-Dec-03 2:38
Monty223-Dec-03 2:38 
QuestionI am new in VC++, can anyone help me? Pin
LostRabbit23-Dec-03 1:22
LostRabbit23-Dec-03 1:22 
AnswerRe: I am new in VC++, can anyone help me? Pin
Maximilien23-Dec-03 3:06
Maximilien23-Dec-03 3:06 
GeneralGetting class information Pin
Md Saleem Navalur23-Dec-03 1:18
Md Saleem Navalur23-Dec-03 1:18 
GeneralRe: Getting class information Pin
Robert Kuster23-Dec-03 5:44
Robert Kuster23-Dec-03 5:44 
GeneralElement in a vector of set Pin
Anthony_Yio23-Dec-03 1:03
Anthony_Yio23-Dec-03 1:03 
GeneralRe: Element in a vector of set Pin
valikac23-Dec-03 5:49
valikac23-Dec-03 5:49 
GeneralRe: Element in a vector of set Pin
Jijo.Raj23-Dec-03 17:45
Jijo.Raj23-Dec-03 17:45 
GeneralControl doesnot show in the UIDeactivated mode Pin
safee ullah23-Dec-03 0:58
safee ullah23-Dec-03 0:58 
Generalstrange problem with activex control Pin
safee ullah23-Dec-03 0:22
safee ullah23-Dec-03 0:22 
GeneralRe: strange problem with activex control Pin
Monty223-Dec-03 1:12
Monty223-Dec-03 1:12 
GeneralTricky Question Pin
SiddharthAtw22-Dec-03 23:59
SiddharthAtw22-Dec-03 23:59 
GeneralRe: Tricky Question Pin
jhwurmbach23-Dec-03 0:14
jhwurmbach23-Dec-03 0:14 
GeneralRe: Tricky Question Pin
Ian Darling23-Dec-03 0:16
Ian Darling23-Dec-03 0:16 
GeneralRe: Tricky Question Pin
Monty223-Dec-03 1:08
Monty223-Dec-03 1:08 
GeneralRe: Tricky Question Pin
SiddharthAtw23-Dec-03 1:59
SiddharthAtw23-Dec-03 1:59 

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.