| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
HELP! QUICK. please
hey guys. i need to write a program which will have a sequence of characters, that is... if i enter a line saying for example:"today is a great day" i want the program to put every word in a new line:
"today is a great day". i need to use strings; string.find(), string.supstr() and string.replace() thanks |
|
#2
|
|||
|
|||
|
http://www.catb.org/~esr/faqs/smart-questions.html
Also, since the functions you listed are (obviously) known to you, you should be able to piece together the program that does what you need to. If you are truly unable to figure out how those could be used together, maybe you should switch course. See also http://cppreference.com/ You may need to know about string::iterator it = some_string_function(); but that should be all you need. The functionality you describe is much easier to achieve when you're working with streams (cin, ifstream, istringstream) which already tokenize their input; but that's irrelevant if you have an assignment which says you are to use those string functions. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > C/C++ Help > HELP! QUICK. please |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|