Here's a few you may want to think about:
I once wrote a shuffle like this:
#include <string> //include this - I'm not sure how I compiled without it.
//#include <time.h> //don't include this - .h standard headers have everything
//in the global namespace which could lead to name collision
#include <ctime> //include this one instead of <time.h>
//using namespace std; //why bring the whole std namespace in?
//You're only using two (soon to be three) things out of it
void Scramble(string &s)
int size = s.size(); //create a temp variable for size
//instead of calling the function multiple times inside the for loop
cout << s << endl; //you can cout a string; make sure to flush the output
It keeps from erasing and inserting so much. It also cuts down on the number of times through the scramble loop.
void Shuffle(string &s)
int size = s.size();
int i = rand()%(size-a)+a;
i = rand()%(size-a)+a;