i want program that get a string from usre an display it reverse lke this
input (noor)
ouptut (roon)

Recommended Answers

All 7 Replies

i want program that get a string from usre an display it reverse lke this
input (noor)
ouptut (roon)

Then you need to put some effort in like hawita has and start your own thread if you have problems. If you simpy want to copy code I'm sure it will be easy enough to google a snippet like this. I hope you didn't pay to much for the class your taking in that case though cause you are not going to get much out of it.

i want program that get a string from usre an display it reverse lke this
input (noor)
ouptut (roon)

C++ std::reverse works on strings as well as vectors.
Please start a new thread if you have a question.

On the contrary to whats being said, I advice you to not google it, not use std::reverse and not use std::string.rbegin() in conjunction with std::string.rend().

Your purpose should be to get better at programming, so one day you can solve problems by rational thinking, instead of googling everything. Then you will be more valuable. So first think of what you need, write ideas on notepad. Then try to implement it. We will be here waiting to help you in any way possible.

Read up on the functions and capabilites of C++ Strings.. That would do you a lot of good..

My post was intended to be sarcastic apperently some people misinterpreted my text and I appologize. I was trying to convey the same point as you firstPerson. And by google I mean he can gain the tools he needs to do the coding through google searches. The reason for my response as it was is he is simply asking for an answer without giving any effort first.

My post was intended to be sarcastic apperently some people misinterpreted my text and I appologize. I was trying to convey the same point as you firstPerson. And by google I mean he can gain the tools he needs to do the coding through google searches. The reason for my response as it was is he is simply asking for an answer without giving any effort first.

NP, I didn't interpret your post incorrectly, I was just accentuating your point without the sarcasm. Note, OP, you should google a little bit, but not to find answers to your main problem( like reversing a string ), but to find reference for C++ and its capabilities. Later down the road, when you believe you are a competent programmer, then using solutions that someone already wrote is a good idea because it assumably should be tested and debugged and benchmarked for performance. But don't worry about that, right now you are in your developing stage, and should try to solve the problem on your own while using google and others as guidance

Yeah same np. I'm just getting some strange message from a moderator for some reason stating that this thread has been moved or something and reffering to reading the rules. Not sure why I am recieving it that's all. Your response was indeed a better choice of words, and I was refering to the issue of the private message I seem to be recieving from this post rather than your response.

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.