Click here to Skip to main content
14,336,321 members

C / C++ / MFC

 
PraiseRe: zero-sized array in struct/union Pin
CPallini6-Aug-19 10:15
mveCPallini6-Aug-19 10:15 
QuestionRe: zero-sized array in struct/union Pin
Richard MacCutchan5-Aug-19 22:14
protectorRichard MacCutchan5-Aug-19 22:14 
AnswerRe: zero-sized array in struct/union Pin
_Flaviu5-Aug-19 22:27
member_Flaviu5-Aug-19 22:27 
GeneralRe: zero-sized array in struct/union Pin
Richard MacCutchan5-Aug-19 22:43
protectorRichard MacCutchan5-Aug-19 22:43 
GeneralRe: zero-sized array in struct/union Pin
Stefan_Lang6-Aug-19 21:53
memberStefan_Lang6-Aug-19 21:53 
GeneralRe: zero-sized array in struct/union Pin
Richard MacCutchan7-Aug-19 1:27
protectorRichard MacCutchan7-Aug-19 1:27 
GeneralGet rid of the [] Pin
Davie212406-Aug-19 10:19
memberDavie212406-Aug-19 10:19 
AnswerRe: zero-sized array in struct/union Pin
CPallini5-Aug-19 22:32
mveCPallini5-Aug-19 22:32 
Read carefully the documentation[^] (see the sample code).
Using _MAX_PATH (or whatever >0) is correct, the impact is in memory: each time the struct is allocated, _MAX_PATH character pointers are allocated too. You might instead choose to disable the warning, if it makes sense (e.g. there is an additional field in the struct specifying the actual size of the array).
GeneralRe: zero-sized array in struct/union Pin
_Flaviu5-Aug-19 22:41
member_Flaviu5-Aug-19 22:41 
SuggestionRe: zero-sized array in struct/union Pin
Richard MacCutchan5-Aug-19 22:44
protectorRichard MacCutchan5-Aug-19 22:44 
GeneralRe: zero-sized array in struct/union Pin
Stefan_Lang6-Aug-19 21:58
memberStefan_Lang6-Aug-19 21:58 
GeneralRe: zero-sized array in struct/union Pin
_Flaviu5-Aug-19 22:53
member_Flaviu5-Aug-19 22:53 
QuestionMessage Closed Pin
2-Aug-19 3:38
memberMember 145489072-Aug-19 3:38 
Questionerror C2143 error C2059 Pin
_Flaviu31-Jul-19 1:03
member_Flaviu31-Jul-19 1:03 
QuestionRe: error C2143 error C2059 Pin
Richard MacCutchan31-Jul-19 2:01
protectorRichard MacCutchan31-Jul-19 2:01 
AnswerRe: error C2143 error C2059 Pin
_Flaviu31-Jul-19 2:38
member_Flaviu31-Jul-19 2:38 
GeneralRe: error C2143 error C2059 Pin
Richard MacCutchan31-Jul-19 2:54
protectorRichard MacCutchan31-Jul-19 2:54 
GeneralRe: error C2143 error C2059 Pin
_Flaviu31-Jul-19 3:27
member_Flaviu31-Jul-19 3:27 
GeneralRe: error C2143 error C2059 Pin
Richard MacCutchan31-Jul-19 4:03
protectorRichard MacCutchan31-Jul-19 4:03 
GeneralRe: error C2143 error C2059 Pin
_Flaviu31-Jul-19 22:01
member_Flaviu31-Jul-19 22:01 
GeneralRe: error C2143 error C2059 Pin
k505431-Jul-19 5:39
memberk505431-Jul-19 5:39 
GeneralRe: error C2143 error C2059 Pin
_Flaviu31-Jul-19 21:06
member_Flaviu31-Jul-19 21:06 
QuestionRe: error C2143 error C2059 Pin
David Crow1-Aug-19 3:22
memberDavid Crow1-Aug-19 3:22 
AnswerRe: error C2143 error C2059 Pin
k50541-Aug-19 4:28
memberk50541-Aug-19 4:28 
GeneralRe: error C2143 error C2059 Pin
k50541-Aug-19 3:57
memberk50541-Aug-19 3:57 

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.