[Cialug] Using GCC
Morris Dovey
mrdovey at iedu.com
Sun Apr 8 07:38:24 CDT 2007
Todd Walton wrote:
| Okay, I'm not a programmer, but I'm curious like a cat. I'm working
| through getting familiar with GCC parameters using an article of
| that
| name:
|
http://www.onlamp.com/pub/a/onlamp/2007/04/03/getting-familiar-with-gcc-
parameters.html
|
| I'm trying to compile the below, but I obviously don't know the
| first
| thing about using GCC. How do I compile this?:
|
| #include<stdio.h>
| int main(int argc, char *argv[])
| {
| int i,j,k
| unsigned long acc=0;
| for(i=0;i<10000;i++)
| for(j=0;j<5000;j++)
| for(k=0;k<4;k++)
| acc+=k;
| printf("acc = %lu\n",acc);
| return 0;
| }
The statement " int i,j,k" needs to be terminated with a semicolon.
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA
http://www.iedu.com/DeSoto/solar.html
More information about the Cialug
mailing list