#include<stdlib>
#include<ctime> // it could be <time> or <time.h>
char x[20];
std::cin>>x;
int l = strlen(x);
for(int i=0;i<strlen(x)-1;i++)
x[i]=x[ rand%(strlen(x)-2)];
this is not very good example because elements could possibly be repeated.....but you can amend it......for example create char y[20] and in each step input in it x[ rand%(strlen(x)-2)].......then in each step check wheter your new x[ rand%(strlen(x)-2)] already exists in y[20] or not....in this way you can do what you want but that also isn't the best way to solve problem...
im doing this in a project. In a 3D char array that can have hundreds of different strings, if i do it that way its gonna be really uneficient, and consume lots of time, what i was looking for was to somehow just input a string and get a mixed up string, if i mix a char 1 by 1, its gonna be many thousands of iterations.
In worst case i can have 5000 words with an average of 7 letters each making it 35000 iterations plus the collisons
i tried this and sometimes, i knew this would happen it came truck has the output, so ill just put a clause and use caligulas idea if that happens.
thx every1 for the help, would have taken way more time alone.