Click here to Skip to main content
15,892,768 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionhow to Add the help file in SDI Application Pin
sarfaraznawaz23-Oct-11 21:01
sarfaraznawaz23-Oct-11 21:01 
AnswerRe: how to Add the help file in SDI Application Pin
Richard MacCutchan23-Oct-11 22:38
mveRichard MacCutchan23-Oct-11 22:38 
AnswerRe: How to call the html help api Pin
App_24-Oct-11 6:25
App_24-Oct-11 6:25 
QuestionSetCurrentDirectory Pin
sarfaraznawaz23-Oct-11 19:42
sarfaraznawaz23-Oct-11 19:42 
AnswerRe: SetCurrentDirectory Pin
tolw23-Oct-11 21:58
tolw23-Oct-11 21:58 
AnswerRe: SetCurrentDirectory Pin
App_24-Oct-11 2:58
App_24-Oct-11 2:58 
Questionworking with byte arrays Pin
jkirkerx22-Oct-11 8:58
professionaljkirkerx22-Oct-11 8:58 
AnswerRe: working with byte arrays Pin
Chuck O'Toole22-Oct-11 9:35
Chuck O'Toole22-Oct-11 9:35 
I can't speak for your application nor what data you will be receiving from the socket. But if the data is a "protocol", that is, some well defined sequence of bytes with fields, flags, data, etc, then it is most likely that the information is "binary", that is, not all the data maps nicely into printable or viewable characters, all zero bytes comes to mind, your 0x05 example too.

C and C++ "string" variables, whether CString or std::string and their manipulation functions are not really tolerant of nulls intersperced in the data.

C# strings do allow nulls in the data and I have seen many a C / C++ programmer get totally confused by the idea of nulls in strings.

So, I'd say save yourself some future grief and use a byte array. Passing a byte array is no different than passing a char array other than some folks incorrectly equate "char array" with "string" in all cases.
GeneralRe: working with byte arrays Pin
jkirkerx22-Oct-11 15:46
professionaljkirkerx22-Oct-11 15:46 
AnswerRe: working with byte arrays Pin
Albert Holguin22-Oct-11 12:02
professionalAlbert Holguin22-Oct-11 12:02 
GeneralRe: working with byte arrays Pin
jkirkerx22-Oct-11 15:51
professionaljkirkerx22-Oct-11 15:51 
AnswerRe: working with byte arrays Pin
Richard MacCutchan22-Oct-11 21:46
mveRichard MacCutchan22-Oct-11 21:46 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 8:07
professionaljkirkerx23-Oct-11 8:07 
GeneralRe: working with byte arrays Pin
Richard MacCutchan23-Oct-11 8:26
mveRichard MacCutchan23-Oct-11 8:26 
AnswerRe: working with byte arrays Pin
Erudite_Eric23-Oct-11 1:58
Erudite_Eric23-Oct-11 1:58 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 8:22
professionaljkirkerx23-Oct-11 8:22 
GeneralRe: working with byte arrays Pin
Goto_Label_23-Oct-11 8:44
Goto_Label_23-Oct-11 8:44 
GeneralRe: working with byte arrays Pin
Richard MacCutchan23-Oct-11 9:02
mveRichard MacCutchan23-Oct-11 9:02 
GeneralRe: well done, you cracked the code Pin
App_23-Oct-11 9:06
App_23-Oct-11 9:06 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 9:18
professionaljkirkerx23-Oct-11 9:18 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 9:30
professionaljkirkerx23-Oct-11 9:30 
GeneralRe: working with byte arrays Pin
Richard MacCutchan23-Oct-11 9:38
mveRichard MacCutchan23-Oct-11 9:38 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 9:42
professionaljkirkerx23-Oct-11 9:42 
GeneralRe: working with byte arrays Pin
Richard MacCutchan23-Oct-11 9:56
mveRichard MacCutchan23-Oct-11 9:56 
GeneralRe: working with byte arrays Pin
jkirkerx23-Oct-11 10:06
professionaljkirkerx23-Oct-11 10:06 

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.