I am doing C++ programming course and need some help on this assignment.
The assignment is to get strings from the user until end comes up and then return the longest string i am stuck and not sure where to go. Here is the little that I have done.
/* File: longStr.cpp
* This program reads a list of words until "end"
* appears and return the longest string.
string firStr, lonStr;
int num, lon;
printf("Please enter list of strings.\nAs a sentinel value use end\n");
lon=(lon>=num)? lon : num;