ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

What must I use instead of strrev() function? (for reversing string.)
Posted by Cebiyev_Ferhad_Qafqaz U. 6 Aug 2010 21:26


Edited by author 06.08.2010 21:26
Re: What must I use instead of strrev() function? (for reversing string.)
Posted by Andrew Hoffmann aka SKYDOS [Vladimir SU] 6 Aug 2010 22:02
depends what you need.
you can do so:
string s="", g = "andrew";
int len = 6;
for(int i=len-1; i>-1; i--){
   s+=g[i];
}
Re: What must I use instead of strrev() function? (for reversing string.)
Posted by Artem Khizha [DNU] 6 Aug 2010 23:57
Well, you can use whatever you want.
For example, std::reverse or your own bicycle. :)
No subject
Posted by Cebiyev_Ferhad_Qafqaz U. 7 Aug 2010 00:33


Edited by author 07.08.2010 17:42
Re: What must I use instead of strrev() function? (for reversing string.)
Posted by Andrew Hoffmann aka SKYDOS [Vladimir SU] 7 Aug 2010 00:35
By telling so he meant that you are trying to invent something that have been already invented :)

Edited by author 07.08.2010 00:45
No subject
Posted by Cebiyev_Ferhad_Qafqaz U. 7 Aug 2010 00:39


Edited by author 07.08.2010 17:42