How can i reverse a string using the reverse() and reverse_copy() functions from <algorithm>? (i want to copy on a string the reverse of the first n characters of another sting)
yes:) i figures it out know,
Firstly i need s1.assign(n,c);//c has any char in it
and then i can efficiently use: reverse_copy(s2.begin(), s2.begin()+n, s1.begin());
Thank you all :)