[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: char *test[position]



On Fri, Jun 11, 1999 at 06:47:08PM +0200, Felix Kollmann wrote:
> 	unsigned int position= 0;
> 	char *test;
> 	printf ("%s", test[position]);
> But the programm prints the complete string down to [position] .
This would work for a non-pointer (char test[64] or so).

I think for pointers this would work:

printf("%c", test[position]);

Rob
-- 
Rob Kaper | mail: cap@capsi.com + cap@capsi.net + cap@capsi.cx
          | web: http://capsi.com/ + http://capsi.cx/ - icq: 707085
          | "Got up early (as in before noon). A most confusing experience
          |  when the sun is coming up not going down." -- Alan Cox