I'm reading in a text file. I'm reading it one character at a time. How do I append the char I just read to the end of a string?
Here is what I've got (the appending part I can't figure out):
FILE *stream, *fopen();
stream = fopen("fisc.txt","r");
if ( (stream) == NULL)
printf("Can't open %sn","fisc.txt");
counter = 1;
ch = fgetc(stream);
//printf("In the else %c\n", ch);
if (ch != "|")
field[counter] = ch;
while (ch != EOF);
Any help or suggestions are greatly appreciated.