My C is a little more than rusty at the moment, so I\'m failing to create something I think should be pretty basic.
Allow me to refer to character arrays as strings
if storing text in a .c or .h file having more than one line of text, equivalent to the idea of an array of char arrays. can do this:
char * text[] = {
"message1",
"message2",
"message3"
};
can also use char *text[], char near *text[], char far *text[], char huge *text[]. has to have an asterisk or star character for a pointer.
a for loop can be used to display text:
char i; // int type can also be used
for (i = 0, i < 3; i++)
printf("%s\n", text[i]);
other loops:
char i = 0; // may not be zero when declared as "char i;" only
while (i < 3) {
printf("%s\n", text[i]);
i++;
}
or
char i = 0; // may not be zero when declared as "char i;" only
do {
printf("%s\n", text[i]);
i++;
} while (i < 3);