Makiyo wrote:
how do u do something like this
char x[3][10];
x[0][] = "hello";
I got an error,
That's because you can't assign to an array. x[0] is an array of 10 char,
and an array is not a "modifiable lvalue" (I'll spare you the details), so
you can't do what you tried to do.
but is there a way I can do it without using pointer?
No. Any attempt to load x[0] involves using a pointer, although I'll agree
that it doesn't always /look/ like it. This is because of The Rule.
strcpy(x[0], "hello"); will work fine, for example, but it does actually use
a pointer (because of The Rule).
--
Richard Heathfield :
bi****@eton.powernet.co.uk
"Usenet is a strange place." - Dennis M Ritchie, 29 July 1999.
C FAQ:
http://www.eskimo.com/~scs/C-faq/top.html
K&R answers, C books, etc:
http://users.powernet.co.uk/eton