basically i have to write a program that looks like what is below and the goal is for the program to output whats in the file and how many words, lines, paragraphs there are (blank lines between paragraphs).
i understand how to use the .eof() function to read the file till it reaches the end but what is used to find the end of the line? i think once i have that little piece of code i'll be fine doing the rest.
Code:
int main()
{
variable declaration
open files
read a characeter
while(not end of file)
{
while(not end of line)
{
processblank(); // some function
copytext(); // some function
}
updatecount(); // some function
read a character;
.
.
.
}
print total(); // some function
close files;
return 0;
}