E D R , A S I H C RSS

C99표준에추가된C언어의엄청좋은기능

.
.
-_-...
.

#include <stdio.h>

int main()
{
int n;
printf("Array Size? ");
scanf("%d", &n);
int x[n];

int i;
for (i = 0; i < n; i++) {
x[i] = i * 10;
printf("%d ", x[i]);
}

printf("\n");
return 0;
}


  • ㅡ.ㅡ;; gcc , VS.net ;; ? VS.net ? - eternalbleu
  • ... C new malloc ?? .. ??;; -
  • C99 , VS C99 함. gcc 3.0 variable-length array . (gcc C99 extension 형태 .) - eternalbleu
    Open source development using C99
    The new variable-length array (VLA) feature is partially available. Simple VLAs will work. However, this is a pure coincidence; in fact, GNU C has its own variable-length array support. As a result, while simple code using variable-length arrays will work, a lot of code will run into the differences between the older GNU C support for VLAs and the C99 definition. Declare arrays whose length is a local variable, but don't try to go much further.


Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:22:40
Processing time 0.0164 sec