Click here to Skip to main content
15,891,607 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: zero-sized array in struct/union Pin
CPallini5-Aug-19 23:29
mveCPallini5-Aug-19 23:29 
AnswerRe: zero-sized array in struct/union Pin
Randor 5-Aug-19 23:38
professional Randor 5-Aug-19 23:38 
AnswerRe: zero-sized array in struct/union Pin
leon de boer6-Aug-19 3:23
leon de boer6-Aug-19 3:23 
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
mveRichard MacCutchan5-Aug-19 22:14 
AnswerRe: zero-sized array in struct/union Pin
_Flaviu5-Aug-19 22:27
_Flaviu5-Aug-19 22:27 
GeneralRe: zero-sized array in struct/union Pin
Richard MacCutchan5-Aug-19 22:43
mveRichard MacCutchan5-Aug-19 22:43 
GeneralRe: zero-sized array in struct/union Pin
Stefan_Lang6-Aug-19 21:53
Stefan_Lang6-Aug-19 21:53 
I was about to write an answer when i saw this. Yes, zero length char arrays at the end of a struct appeared to be quite common in C programming some years (or decades, rather) ago. I haven't seen it in any C++ code ever, although it probably works the same. Whatever you wish to achieve, there's probably a better solution available in C++ syntax. Usually, std::string is the go to solution here.

That said, yes, it must be char [], not char* [], otherwise it doesn't make any sense at all.
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

GeneralRe: zero-sized array in struct/union Pin
Richard MacCutchan7-Aug-19 1:27
mveRichard MacCutchan7-Aug-19 1:27 
GeneralGet rid of the [] Pin
Davie212406-Aug-19 10:19
Davie212406-Aug-19 10:19 
AnswerRe: zero-sized array in struct/union Pin
CPallini5-Aug-19 22:32
mveCPallini5-Aug-19 22:32 
GeneralRe: zero-sized array in struct/union Pin
_Flaviu5-Aug-19 22:41
_Flaviu5-Aug-19 22:41 
SuggestionRe: zero-sized array in struct/union Pin
Richard MacCutchan5-Aug-19 22:44
mveRichard MacCutchan5-Aug-19 22:44 
GeneralRe: zero-sized array in struct/union Pin
Stefan_Lang6-Aug-19 21:58
Stefan_Lang6-Aug-19 21:58 
GeneralRe: zero-sized array in struct/union Pin
_Flaviu5-Aug-19 22:53
_Flaviu5-Aug-19 22:53 
Questionerror C2143 error C2059 Pin
_Flaviu31-Jul-19 1:03
_Flaviu31-Jul-19 1:03 
QuestionRe: error C2143 error C2059 Pin
Richard MacCutchan31-Jul-19 2:01
mveRichard MacCutchan31-Jul-19 2:01 
AnswerRe: error C2143 error C2059 Pin
_Flaviu31-Jul-19 2:38
_Flaviu31-Jul-19 2:38 
GeneralRe: error C2143 error C2059 Pin
Richard MacCutchan31-Jul-19 2:54
mveRichard MacCutchan31-Jul-19 2:54 
GeneralRe: error C2143 error C2059 Pin
_Flaviu31-Jul-19 3:27
_Flaviu31-Jul-19 3:27 
GeneralRe: error C2143 error C2059 Pin
Richard MacCutchan31-Jul-19 4:03
mveRichard MacCutchan31-Jul-19 4:03 
GeneralRe: error C2143 error C2059 Pin
_Flaviu31-Jul-19 22:01
_Flaviu31-Jul-19 22:01 
GeneralRe: error C2143 error C2059 Pin
k505431-Jul-19 5:39
mvek505431-Jul-19 5:39 
GeneralRe: error C2143 error C2059 Pin
_Flaviu31-Jul-19 21:06
_Flaviu31-Jul-19 21:06 
QuestionRe: error C2143 error C2059 Pin
David Crow1-Aug-19 3:22
David Crow1-Aug-19 3:22 

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.