Re: training

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Kevin Fries
Date:  
To: plug-discuss
Subject: Re: training
On Mon, 2011-12-19 at 15:07 -0700, Michael Havens wrote:
> I might be grren but I did put the '#include<stdlib.h>' in. In fact I
> copied the entire file and it didn't compile.


Not sure what was wrong.

I was able to run your example:

kfries@kfries-laptop:tmp$ cat argexample.c
#include <stdio.h>

int main (int argc, char **argv) {
   int count;
   for (count = 0; count < argc; count++) {
      printf ("argument no %d = %s\n", count, *argv++);
   };


return 0;
}
kfries@kfries-laptop:tmp$ gcc -o argexample argexample.c
kfries@kfries-laptop:tmp$ ./argexample hello world
argument no 0 = ./argexample
argument no 1 = hello
argument no 2 = world


Hope this helps
Kevin

---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss