Hi...
I'm a newbie to C++ and am stuck trying to develop a school project. I need to develop a small C++ program that will accept data files(.txt in this case). Contained in the files are a collection of strings(sentences, words, letters or whatever). If the file contains eight or more lines, the program will display to the screen the first four lines of the file, followed by the last four lines. If the data file is eight line or less, then the entire file will be displayed to screen. Like I said, I'm new to C++ and have tried all the forms of the function getline, as well as trying to assign, remove, ignore, and replace strings in order to display only the eight lines(the first four, and the last four). Any guidance and/or coding examples of how one would be able to add and/or remove strings line by line would be greatly appreciated. In fact, ANY help at all would be appreciated...
Thank You