Hi, I am sure this question must have been asked before but I can't find it anyway.
I have initialised an array of strings
I don't understand why
char names = "Bert"
doesn't work (incompatible assignment error), even so I have tried
dir = "Bert" and strcpy("Bert", dir)
but the latter just crashes the program.
On a slightly related topic I was also wondering why you can use terminate for loops of a string like this
char name = "Bert"; for(int i =0; name[i]; i++)
Yet if I put "Be0rt" it doesn't terminate when it sees the zero only the null terminator. Is this because 0 doesn't have the value of zero in ASII or is there another reason?