944,167 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 337
  • C++ RSS
Oct 29th, 2009
0

I need advice on removing suffixes.......

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
reese27 is offline Offline
10 posts
since Sep 2009
Oct 29th, 2009
0
Re: I need advice on removing suffixes.......
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.
Reputation Points: 718
Solved Threads: 373
Nearly a Posting Maven
Lerner is offline Offline
2,253 posts
since Jul 2005
Oct 29th, 2009
0
Re: I need advice on removing suffixes.......
Click to Expand / Collapse  Quote originally posted by Lerner ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
reese27 is offline Offline
10 posts
since Sep 2009
Oct 29th, 2009
0
Re: I need advice on removing suffixes.......
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.
Reputation Points: 718
Solved Threads: 373
Nearly a Posting Maven
Lerner is offline Offline
2,253 posts
since Jul 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: standard library for c++
Next Thread in C++ Forum Timeline: help with binary search trees and saving them





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC