You could also consider an STL solution - random_shuffle......looks like that's just what you are looking for!
Code:
#include <iostream>
#include <ctime>
#include <cstdlib>
#include <vector>
#include <algorithm>
void Print(const std::vector<int>& v)
{
for(std::vector<int>::const_iterator i = v.begin();
i < v.end();++i)
std::cout << *i << " ";
std::cout << std::endl;
}
int main(void)
{
const int MaxNumbers = 10;
std::vector<int> v;
std::srand(std::time(0));
for(int i = 0;i < MaxNumbers;++i)
v.push_back(i + 1);
Print(v);
std::random_shuffle(v.begin(),v.end());
Print(v);
std::random_shuffle(v.begin(),v.end());
Print(v);
}