This is outside the main:
char message_ecran[NUMBER_OF_STRINGS][STRING_LENGTH+1];
And this is my function
int main(void)
{
Init();
int i;
char texte7[] = "io";
for (i=0;i<=NUMBER_OF_STRINGS;i++)
{
message_ecran[i] = texte7;
}
}
I would like to have an array of strings message_ecran, but it does'nt work:
incompatible types in assignment
strcpy_sinstead of your assignment operator.strcpy_sisn't part of the C standard library. Usestrncpyinstead.memsetormemcpybe better then?i <= NUMBER_OF_STRINGSintoi < NUMBER...memcpyis a general copy algorithm, whilestrncpywill stop on\0or if a specified number of characters has been copied (strncpy= str ing (n characters) c o py)