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

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.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.