ë‘가지. ì„ ì–¸ì„ ë¸”ë¡ì˜ ì•žì´ ì•„ë‹ˆë¼ ì¤‘ê°„ì—ë„ ì„ ì–¸ 가능. ë°°ì—´ì„ ë™ì 으로 ì €ë ‡ê²Œ í• ë‹¹í•˜ë‹¤ë‹ˆ -_-... 함수내ì—서 함수 ì„ ì–¸ 가능. {{{ #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; } }}} AnswerMe) * í ì´ìƒí•˜ë„¤ ã…¡.ã…¡;; gccì—서는 ë˜ê³ , VS.netì—서는 ì—러를;; 잘못 ì»´íŒŒì¼ í•œê±´ê°€? 혹시 VS.netì—서는 안ë˜ë‚˜ìš”? - [eternalbleu] * íìŒ... Cì—서 ë™ì í• ë‹¹ì„ í•˜ê¸° 위해서는 new나 malloc ì •ë„ì˜ í‚¤ì›Œë“œë¥¼ 사용해야 하지 않나요?? 혹시.. ì»´íŒŒì¼ ì˜µì…˜ì„ ë‹¬ë¦¬í•´ì•¼ 하는??;; - [ì´ìŠ¹í•œ] * 알아본 ê²°ê³¼ C99ì—서 ì§€ì›ë˜ëŠ” 것으로 í‘œì¤€ì´ ë§žìœ¼ë©°, 단지 VSì˜ ì»´íŒŒì¼ëŸ¬ê°€ C99를 ì™„ì „ížˆ 만족시키지 않기 때문ì´ë¼ê³ 함. gccë„ 3.0 ì´í›„ë²„ì „ë¶€í„° ì§€ì›ëœ 기능으로 variable-length array ì´ë¼ê³ 부르는군요. (gcc는 C99발표ì´ì „부터 extension ì˜ í˜•íƒœë¡œ ì§€ì›ì„ 하기는 í–ˆë‹¤ê³ í•©ë‹ˆë‹¤.) - [eternalbleu] [http://www-128.ibm.com/developerworks/linux/library/l-c99.html?ca=dgr-lnxw07UsingC99 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.