Click here to Skip to main content
15,889,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Strange chars Pin
_Flaviu28-Apr-20 9:40
_Flaviu28-Apr-20 9:40 
GeneralRe: Strange chars Pin
Richard Andrew x6428-Apr-20 9:57
professionalRichard Andrew x6428-Apr-20 9:57 
AnswerRe: Strange chars Pin
Richard MacCutchan28-Apr-20 21:32
mveRichard MacCutchan28-Apr-20 21:32 
GeneralRe: Strange chars Pin
_Flaviu28-Apr-20 21:54
_Flaviu28-Apr-20 21:54 
GeneralRe: Strange chars Pin
kalberts28-Apr-20 22:41
kalberts28-Apr-20 22:41 
GeneralRe: Strange chars Pin
Richard MacCutchan28-Apr-20 22:47
mveRichard MacCutchan28-Apr-20 22:47 
GeneralRe: Strange chars Pin
_Flaviu29-Apr-20 3:10
_Flaviu29-Apr-20 3:10 
GeneralRe: Strange chars Pin
Richard MacCutchan29-Apr-20 3:27
mveRichard MacCutchan29-Apr-20 3:27 
You are making a wrong assumption. The sizeof(dir_struct->directory) operator will return 2048. But what if the string in that table is less than that? You need an actual count of the number of valid characters in the directory field (assuming that it is correctly null terminated).

You are also mixing the dot (.) and arrow (->) operators on your struct reference.

But all this is largely irrelevant. You need to go back a stage to the code that fills the directory structure in the first place, as that is where the problem is most likely to be found.
GeneralRe: Strange chars Pin
_Flaviu29-Apr-20 4:25
_Flaviu29-Apr-20 4:25 
GeneralRe: Strange chars Pin
Richard MacCutchan29-Apr-20 6:07
mveRichard MacCutchan29-Apr-20 6:07 
GeneralRe: Strange chars Pin
k505429-Apr-20 4:21
mvek505429-Apr-20 4:21 
GeneralRe: Strange chars Pin
_Flaviu29-Apr-20 21:05
_Flaviu29-Apr-20 21:05 
GeneralRe: Strange chars Pin
Victor Nijegorodov29-Apr-20 22:38
Victor Nijegorodov29-Apr-20 22:38 
GeneralRe: Strange chars Pin
_Flaviu3-May-20 3:35
_Flaviu3-May-20 3:35 
GeneralRe: Strange chars Pin
Victor Nijegorodov3-May-20 4:37
Victor Nijegorodov3-May-20 4:37 
GeneralRe: Strange chars Pin
Richard MacCutchan29-Apr-20 23:25
mveRichard MacCutchan29-Apr-20 23:25 
GeneralRe: Strange chars Pin
_Flaviu29-Apr-20 23:34
_Flaviu29-Apr-20 23:34 
GeneralRe: Strange chars Pin
kalberts29-Apr-20 23:50
kalberts29-Apr-20 23:50 
GeneralRe: Strange chars Pin
_Flaviu30-Apr-20 2:35
_Flaviu30-Apr-20 2:35 
GeneralRe: Strange chars Pin
Richard MacCutchan30-Apr-20 0:04
mveRichard MacCutchan30-Apr-20 0:04 
GeneralRe: Strange chars Pin
_Flaviu30-Apr-20 3:01
_Flaviu30-Apr-20 3:01 
GeneralRe: Strange chars Pin
Richard MacCutchan30-Apr-20 3:40
mveRichard MacCutchan30-Apr-20 3:40 
QuestionRe: Strange chars Pin
David Crow30-Apr-20 3:50
David Crow30-Apr-20 3:50 
AnswerRe: Strange chars Pin
Richard MacCutchan30-Apr-20 4:02
mveRichard MacCutchan30-Apr-20 4:02 
GeneralRe: Strange chars Pin
Victor Nijegorodov30-Apr-20 5:55
Victor Nijegorodov30-Apr-20 5:55 

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.