im having a strange issue when trying to access the first character in a string. Im attempting to write a program that reads info from a file and separates it into a struct. however when i attempt to access a specific character in a string, i get a strange error. below is the error and code snippets.
Error:
/usr/include/stdio.h:332:43: note: expected ‘const char * restrict’ but argument is of type ‘char’
332 | extern int printf (const char *__restrict __format, ...);
code snippets. (not the whole program, just the lines that seem to be having issues)
char lineArray[40][101];
strcpy(lineArray[lineNum], validLine);
printf(lineArray[lineNum][0]);
when attempting to print the first character in an entry in lineArray, i get the above error. I get the same error when using strcpy in order to try and copy the first character into a different string. Any help would be greatly appreciated. Sorry if this is a foolish quetion, im still pretty new to C