0

I'm trying to figure out how to even start a program that removes suffixes like if i were to enter programs, are, not, limited, to, drawing, composition, it would output....
program
are
not
limit
to
draw
composi

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Lerner
0

In the example shown I'd probably use the appropriate version of getline() for the type of string I'm going to use with the comma char as the delimiting char. This could be generalized to using any valid char as a delimiting char, not just the comma char. However, if the suffixes don't have to be a single char, then the process is a little more complicated.

0

In the example shown I'd probably use the appropriate version of getline() for the type of string I'm going to use with the comma char as the delimiting char. This could be generalized to using any valid char as a delimiting char, not just the comma char. However, if the suffixes don't have to be a single char, then the process is a little more complicated.

Could you show me an example? I am a beginner, if you have to time to show me an example.

0

getline(temp, ',');
willl take Hello from the string Hello, World and put it in temp, if temp is declared to be an STL string object.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.