我知道,在c编译时间之前,一个数组需要有一个特定的大小.
int s; printf("enter the array size: "); scanf("%d",&s); int a[s]; // Isn't s value determined at run time?
解决方法
数组大小需要用ANSI 89 C知道.99版本的规范删除了这个限制,允许使用可变大小的数组.
> http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC49@H_502_3@