Click here to Skip to main content
15,910,980 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: FD_ACCEPT event very slow (sometimes) Pin
od@ananzi.co.za22-May-07 4:39
od@ananzi.co.za22-May-07 4:39 
GeneralRe: FD_ACCEPT event very slow (sometimes) Pin
Moak25-May-07 2:53
Moak25-May-07 2:53 
GeneralRe: FD_ACCEPT event very slow (sometimes) Pin
od@ananzi.co.za21-Jun-07 2:42
od@ananzi.co.za21-Jun-07 2:42 
GeneralRe: FD_ACCEPT event very slow (sometimes) Pin
Moak21-Jun-07 6:51
Moak21-Jun-07 6:51 
GeneralRe: FD_ACCEPT event very slow (sometimes) Pin
od@ananzi.co.za21-Jun-07 9:32
od@ananzi.co.za21-Jun-07 9:32 
GeneralRe: FD_ACCEPT event very slow (sometimes) Pin
Moak28-Jun-07 5:39
Moak28-Jun-07 5:39 
Questionreading 'null' from binary files into char arrays/strings Pin
dfn9-May-07 8:02
dfn9-May-07 8:02 
AnswerRe: reading 'null' from binary files into char arrays/strings Pin
Chris Losinger9-May-07 8:25
professionalChris Losinger9-May-07 8:25 
dfn wrote:
I assume this is so because one of the bytes I read (00) is treated like '\0' (null)


it's not just "treated like" a null, it is a null. C-style strings end on zero bytes.

short answer: if your data contains 0's, don't treat it as a C string.

long answer: if you need to read non-text data, you're going to have to read the data into byte arrays (char/u-char) and manipulate it there, with pointers - don't put it in std::strings or CStrings or anything like that because those objects are going to see those 0's and treat them as string terminators.




GeneralRe: reading 'null' from binary files into char arrays/strings Pin
dfn9-May-07 9:53
dfn9-May-07 9:53 
GeneralRe: reading 'null' from binary files into char arrays/strings Pin
Chris Losinger9-May-07 10:18
professionalChris Losinger9-May-07 10:18 
GeneralRe: reading 'null' from binary files into char arrays/strings Pin
dfn9-May-07 10:41
dfn9-May-07 10:41 
QuestionRe: reading 'null' from binary files into char arrays/strings Pin
David Crow9-May-07 8:27
David Crow9-May-07 8:27 
AnswerRe: reading 'null' from binary files into char arrays/strings Pin
dfn9-May-07 9:54
dfn9-May-07 9:54 
AnswerRe: reading 'null' from binary files into char arrays/strings Pin
GameProfessor9-May-07 15:41
GameProfessor9-May-07 15:41 
GeneralRe: reading 'null' from binary files into char arrays/strings Pin
dfn10-May-07 5:23
dfn10-May-07 5:23 
AnswerRe: reading 'null' from binary files into char arrays/strings Pin
Nelek9-May-07 22:33
protectorNelek9-May-07 22:33 
GeneralRe: reading 'null' from binary files into char arrays/strings Pin
dfn10-May-07 5:22
dfn10-May-07 5:22 
QuestionHow to launch a second application? Pin
IlanTal9-May-07 7:06
IlanTal9-May-07 7:06 
AnswerRe: How to launch a second application? Pin
led mike9-May-07 7:35
led mike9-May-07 7:35 
AnswerRe: How to launch a second application? Pin
Hamid_RT9-May-07 7:39
Hamid_RT9-May-07 7:39 
AnswerRe: How to launch a second application? Pin
David Crow9-May-07 8:10
David Crow9-May-07 8:10 
AnswerRe: How to launch a second application? Pin
SandipG 10-May-07 0:37
SandipG 10-May-07 0:37 
AnswerRe: How to launch a second application? Pin
IlanTal10-May-07 0:52
IlanTal10-May-07 0:52 
AnswerRe: How to launch a second application? Pin
#realJSOP10-May-07 2:06
professional#realJSOP10-May-07 2:06 
QuestionWYSIWYG Text Box Printing w/ Tabs Pin
GabeON9-May-07 6:05
GabeON9-May-07 6:05 

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.