Out of curiosity, what platform are you developing for?
This is a discussion on Adding C++ support to C thought library? within the C Programming forums, part of the General Programming Boards category; http://www.parashift.com/c++-faq-lit...html#faq-38.13 http://llvm.cs.uiuc.edu/docs/FAQ.html#translatec++ Out of curiosity, what platform are you developing for?...
What are even the point of vla's? Couldn't you just use new? Aren't vla's allocated on the heap like new?
What C++ features are you needing compiled into a C program, is probably the most important question that seems to have gone unanswered thus far? You should be using a C++ compiler to compile code that is a "mix" of the two languages OR you should be using a linker to link object files that are compiled using each respective language into one binary.
Whatever you are doing, you are probably not asking the appropriate question to accomplish the task.
Last edited by Elysia; 09-09-2008 at 10:02 AM.
For information on how to enable C++11 on your compiler, look here.
VLAs are not an initializer feature. They have nothing to do with initializers.
Also, they're on the stack. They're not allowed in global or member contexts. That makes them very useful for small-ish buffers where you know the size at runtime only.
All the buzzt!
"There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
- Flon's Law