Mail from ILUG-BOM list (Non-Digest Mode)
On Jul 6, 2000 at 23:02, Nikhil Kikkeri wrote:
>i am new to GCC.when i make a simple declaration in GCC like
>
>int xyz[10];
>
>it gives me a run time error.
>
>in fact GCC generates run time error whenever i use arrays.
[satyap]~$ gcc foo.c
foo.c: In function `main':
foo.c:4: warning: return type of `main' is not `int'
[satyap]~$ ./a.out
a[0]=1 a[1]=2
[satyap]~$ cat foo.c
#include <stdio.h>
void main() {
int a[10];
a[0]=1;
a[1]=2;
printf("a[0]=%d a[1]=%d\n",a[0],a[1]);
}
[satyap]~$
So show us your code.
--
Satya. <URL:http://satya.virtualave.net/>
US-bound grad students! For pre-apps, see <URL:http://quickapps.cjb.net/>
FREE! Email reminder service at http://satya.virtualave.net/rem.html
_______________________________________________
Website: http://www.ilug-bom.org.in/ilug
Linuxers mailing list
[EMAIL PROTECTED]
http://ilug-bom.org.in/mailman/listinfo/linuxers