Carl3003
asked on
calculationg lines by \n and not word wrap?
I am just wondering if there is an easier way to calculate lines based on (enter key) \n. One one to do is to go trhough each char and find how many \n are there in the file. The statement i am using is:
while ( fgets( line, LINELEN, fp ) )
{ /* more input */
total_lines++; /* count it */
}
thanks
while ( fgets( line, LINELEN, fp ) )
{ /* more input */
total_lines++; /* count it */
}
thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.