Q/write program with c++ using strings to add word to any place(location) in text?? example:input(the bird wen?
-
Q/write program with c++ using strings to add word to any place(location) in text?? example:input(the bird went of) ::: output(the bird went ofcage) where add word (cage) to text in last place(loction).
-
Answer:
If you're just gonna add to the end of the string, you can simply use +=, like this: string s1 = "the bird went of"; s1 += "cage"; Otherwise, you can use the "insert" function s1.insert(5,"cage"); http://www.cplusplus.com/reference/string/string/insert/
Ahmed at Yahoo! Answers Visit the source
Related Q & A:
- How To Write An Example Resume?Best solution by Yahoo! Answers
- How can I trick SSH to connect using different configurations based on current location?Best solution by Server Fault
- Why is the last input printed twice in the text.txt?Best solution by dreamincode.net
- How to update an open Excel in C# using OLEDB?Best solution by stackoverflow.com
- Does a cell phone send a DPS location when you send a text message?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.