Yes but why isnt the first const char for example "Clubs" is intialized why should there be need for pointer storing and int storing will cause an error
constchar suitNames[4]; is an array of four characters. Each element in the array is a constchar. char is a datatype that holds one character. One byte.
"Diamonds " is not a single charater. It is an array or characters. If you need an array of arrays, then an array of single characters just doesn't suit you.
Yes you made the array point clear for me but i understand the use for pointer in it now it's been made clear by you to me that const char suitNames[] is reqired but why this will cause error instead we should write const char * suitNames[]
Lets forget the array. Lets take just one value. You would like to write constchar name = "fubar"; but that does not work. Why?
You are attempting to store the address of a constant string literal (which are stored in memory space of their own) into a variable that does store one character. An address of a memory location is not same as a char.
You are attempting to store the address of a constant string literal (which are stored in memory space of their own) into a variable that does store one character. An address of a memory location is not same as a char.
Did you mean char has a memory of 1 byte and it will not store const char vaariable but it will do so if its a const char pointer variable