Re: Segmentation fault!



"Rod Pemberton" <do_not_have@xxxxxxxxxxxxxxxxxxx> writes:
[...]
Just an FYI (for others, since Chris is probably familiar), this technique
existed prior to C99. It was called the C90 'struct hack' and works with
almost all C compilers. When standardized in C99, it became known as
variable length arrays.

You're thinking of flexible array members; variable length arrays are
a different feature.

Rod, a personal observation: your recent postings here have actually
been reasonable. Have you decided not to be an abusive troll? (See
the recent "Which members are created automatically, which members are
not inherited?" thread if you don't know what I'm referring to.)

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.



Relevant Pages

  • Re: Help a beginner - function with pointer ...
    ... Windows, for example. ... It says something about C99... ... not about arrays only. ...
    (comp.lang.c)
  • Re: Linguistics and such
    ... Many compilers don't ... >> yet support C99, and so do not support variable length arrays. ...
    (comp.lang.c)
  • Re: Lookup Table
    ... > I'm trying to code a lookup table in the form of a constant array for use ... If your arrrays (or any other type data members) are nonstatic, ... But arrays cannot be used in a ctor init-list, ... The definitions (and initializers) must appear ...
    (alt.comp.lang.learn.c-cpp)
  • Re: invalid use of non-lvalue array
    ... Eben _weil_ ich den Standard gelesen habe, ... C89 hat genau wie C99 den Namen eines Arrays als Zeiger auf das ... >> erste Element interpretiert. ...
    (de.comp.lang.c)
  • Re: C vs. C++
    ... In my experience, they actually prefer Fortran, but C99 has added some new features that remove some of the advantages Fortran used to have over C, from the point of view of physicists. ... Most importantly, C now has direct language level support for complex math, include a bunch of new math library functions that take complex arguments and return complex values. ... C99 has also added variable length arrays, which make it much easier to deal with arrays of data, especially multi-dimensional arrays. ... By the way, every new feature that makes C more attractive to computational physicists has been roundly criticized by people who can't imagine why any significant number of programmers would need complex numbers, multidimensional arrays, or precise control over floating point math. ...
    (comp.lang.c)