0
How to make a string reverse of a string a password
5 Respostas
+ 3
With std::reverse.
+ 3
Bebida Roja iterator, not pointer, but yes.
+ 2
there is a std::reverse function located in the <algorithm> library, which takes the begin and the end pointer, and reverses the content from beginning to end. For example,
#include <algorithm>
#include <string> // Needed libraries
std::string str { "mystring" }; // Initialize str
std::reverse(str.begin(), str.end()); // Reverses content of str
cout << str; // Outputs "gnirtsym"
+ 1
Well, what's a password? Nothing but a string.
In a real application, you should hash it, though.
0
how to make it a password