Click here to Skip to main content
15,915,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: asign to return value Pin
Calin Negru2-May-20 22:50
Calin Negru2-May-20 22:50 
GeneralRe: asign to return value Pin
Stephane Capo2-May-20 23:03
professionalStephane Capo2-May-20 23:03 
GeneralRe: asign to return value Pin
Calin Negru2-May-20 23:13
Calin Negru2-May-20 23:13 
GeneralRe: asign to return value Pin
Stephane Capo2-May-20 23:51
professionalStephane Capo2-May-20 23:51 
GeneralRe: asign to return value Pin
Richard MacCutchan2-May-20 23:21
mveRichard MacCutchan2-May-20 23:21 
GeneralRe: asign to return value Pin
Calin Negru2-May-20 23:35
Calin Negru2-May-20 23:35 
GeneralRe: asign to return value Pin
Richard MacCutchan2-May-20 23:48
mveRichard MacCutchan2-May-20 23:48 
GeneralRe: asign to return value Pin
Calin Negru3-May-20 0:00
Calin Negru3-May-20 0:00 
GeneralRe: asign to return value Pin
Richard MacCutchan3-May-20 0:07
mveRichard MacCutchan3-May-20 0:07 
GeneralRe: asign to return value Pin
«_Superman_»9-May-20 20:01
professional«_Superman_»9-May-20 20:01 
AnswerRe: asign to return value Pin
Calin Negru3-May-20 3:26
Calin Negru3-May-20 3:26 
QuestionProperty Sheet Display issues Pin
LegacyGuy30-Apr-20 9:27
LegacyGuy30-Apr-20 9:27 
AnswerRe: Property Sheet Display issues Pin
Victor Nijegorodov30-Apr-20 10:01
Victor Nijegorodov30-Apr-20 10:01 
GeneralRe: Property Sheet Display issues Pin
Richard MacCutchan30-Apr-20 21:33
mveRichard MacCutchan30-Apr-20 21:33 
QuestionStrange chars Pin
_Flaviu28-Apr-20 8:31
_Flaviu28-Apr-20 8:31 
AnswerRe: Strange chars Pin
Richard Andrew x6428-Apr-20 9:19
professionalRichard Andrew x6428-Apr-20 9:19 
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 
How do you obtain the file name from Windows? Which API function call are you using? If the documentation for that API function call specifies that the name is null terminated, then you should not be getting the garbage. But some old file systems set off a fixed length buffer for the file name - even in Unix! The original Unix directory was 16 bytes per entry: two bytes inode, 14 chars filename. The orginal FAT had room for 8 char file name, 3 char extension. If the field was filled with a maximum length file name (in either Unix or FAT), there was no room for a terminating nul. If you reach the end of the field before finding a null, it is nevertheless the end of the field!

Remember that nul terminated strings is an idea conceived for the C language. It directoy conflicts with the ISO character set standard, whether ISO 646, 8859 or other variants. Other languages have used other solutions, e.g. in Pascal, a string is (at least in most implementations) represented by a length field associated with the string buffer (so the ISO NUL character can be used in the ISO standard way!). Many other languages to the same.

DOS was developed before C and Unix. Windows was developed before Unix had become very important, at least in the market segments Windows was aimed at. So you should not take for granted that all sorts of C / Unix conventions have been adopeted in every other segment.
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 
GeneralRe: Strange chars Pin
_Flaviu29-Apr-20 4:25
_Flaviu29-Apr-20 4:25 

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.