I have to read in lines of text and append them to a char buffer[1000]. replace all the newline '\n' characters with '\0' terminators. i also have to have an array char* lines[100] so that the pointers in that array point to the beginnings of lines in the text. then display the lines in reverse order starting with the last input line. I've gotten most of it done but I'm stuck at this particular error I'm getting. Hopefully someone can help tell me what I'm doing wrong and what I need to correct it? Thanks a ton! Please see below:
Couldn't you just read everything into a single string with a bunch of getlines, then use .find() to replace all the '\n's with '\0's and print it or copy it?