Timeline for answer to Can we have functions inside functions in C++? by Thomas Owens
Current License: CC BY-SA 2.5
Post Revisions
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Dec 1, 2010 at 17:34 | comment | added | luis.espinal | I've used the gcc extension for support of nested functions (in C, though, not C++). Nested functions are a nifty thing (as in Pascal and Ada) for managing complex, yet cohesive structures that are not meant to be of general use. As long as one uses the gcc toolchain, it is assured to be mostly portable to all targeted architectures. But if there is change of having to compile the resulting code with a non-gcc compiler, then, it is best to avoid such extensions and stick as close as possible to the ansi/posix mantra. | |
| Dec 1, 2010 at 13:31 | history | edited | Thomas Owens | CC BY-SA 2.5 |
added 134 characters in body
|
| Dec 1, 2010 at 13:30 | comment | added | Thomas Owens | Ah. I don't have any special extensions in my C compiler. That's good to know, though. I'll add that titbit to my answer. | |
| Dec 1, 2010 at 13:29 | comment | added | TonyK | It is supported by the GNU C compiler, as a special extension. But only for C, not C++. | |
| Dec 1, 2010 at 13:25 | history | answered | Thomas Owens | CC BY-SA 2.5 |