How do I open a program in its original location?

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

Was this solution helpful to you?

Just Added Q & A:

Find solution

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.