int num = 0;
char line[255];
char skillArray[SKILL_TOTAL];
while (num < SKILL_TOTAL)
{
num++;
snprintf(line, sizeof(line), "[%3d] %s", num, skillText[num]);
skillArray[num] = line; // ERROR: a value of type "char *" cannot be assigned to an entity of type "char"
printf("%s \r\n", line);
}
The above code, minus the "skillArray[num] = line;" part, works great. How can I get each of those lines stuffed into the skillArray[] array?
The reason I want to do this is so that I can perform sorting functions before I print them to the screen.