Click here to Skip to main content
15,860,859 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Find out optimum volume for packing different boxes Pin
David Crow22-Oct-17 17:03
David Crow22-Oct-17 17:03 
QuestionCan I put a variable length array inside a struct somehow? Pin
arnold_w17-Oct-17 0:38
arnold_w17-Oct-17 0:38 
AnswerRe: Can I put a variable length array inside a struct somehow? Pin
Peter_in_278017-Oct-17 0:57
professionalPeter_in_278017-Oct-17 0:57 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
arnold_w17-Oct-17 1:08
arnold_w17-Oct-17 1:08 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
Peter_in_278017-Oct-17 1:43
professionalPeter_in_278017-Oct-17 1:43 
AnswerRe: Can I put a variable length array inside a struct somehow? Pin
CPallini17-Oct-17 1:54
mveCPallini17-Oct-17 1:54 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
arnold_w17-Oct-17 2:02
arnold_w17-Oct-17 2:02 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
CPallini17-Oct-17 2:24
mveCPallini17-Oct-17 2:24 
I report you the first sentence of the linked page:
ISO C99 supports compound literals. A compound literal looks like a cast containing an initializer. Its value is an object of the type specified in the cast, containing the elements specified in the initializer; it is an lvalue. As an extension, GCC supports compound literals in C89 mode and in C++.


So:
  • C99 compilers support it.
  • Your compiler suopports it even in C89 mode.

GeneralRe: Can I put a variable length array inside a struct somehow? Pin
arnold_w17-Oct-17 2:46
arnold_w17-Oct-17 2:46 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
CPallini17-Oct-17 2:58
mveCPallini17-Oct-17 2:58 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
jschell17-Oct-17 7:06
jschell17-Oct-17 7:06 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
Richard MacCutchan17-Oct-17 4:50
mveRichard MacCutchan17-Oct-17 4:50 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
arnold_w17-Oct-17 8:26
arnold_w17-Oct-17 8:26 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
leon de boer17-Oct-17 16:30
leon de boer17-Oct-17 16:30 
AnswerRe: Can I put a variable length array inside a struct somehow? Pin
jschell17-Oct-17 7:20
jschell17-Oct-17 7:20 
GeneralRe: Can I put a variable length array inside a struct somehow? Pin
arnold_w17-Oct-17 8:33
arnold_w17-Oct-17 8:33 
Questioninet error Pin
Member 1346819116-Oct-17 5:22
Member 1346819116-Oct-17 5:22 
GeneralRe: inet error Pin
Richard MacCutchan16-Oct-17 5:35
mveRichard MacCutchan16-Oct-17 5:35 
QuestionMFC Activex Control Pin
RichardK15115-Oct-17 20:53
RichardK15115-Oct-17 20:53 
GeneralRe: MFC Activex Control Pin
Richard MacCutchan16-Oct-17 3:55
mveRichard MacCutchan16-Oct-17 3:55 
GeneralRe: MFC Activex Control Pin
RichardK15116-Oct-17 4:36
RichardK15116-Oct-17 4:36 
GeneralRe: MFC Activex Control Pin
Richard MacCutchan16-Oct-17 5:37
mveRichard MacCutchan16-Oct-17 5:37 
GeneralRe: MFC Activex Control Pin
leon de boer16-Oct-17 20:34
leon de boer16-Oct-17 20:34 
GeneralRe: MFC Activex Control Pin
RichardK15122-Oct-17 23:49
RichardK15122-Oct-17 23:49 
GeneralRe: MFC Activex Control Pin
leon de boer25-Oct-17 9:18
leon de boer25-Oct-17 9:18 

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.