So, I see you are on VC++10:
#include
#include
#include
#include
int main() {
std::array tAlphabet = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', // and so on...
};
// you could store permutations here, but there will be really, really many of them
std::list tAllPermutations;
do {
std::string tCurrentPermutation;
std::for_each(tAlphabet.begin(), tAlphabet.end(),
[&tCurrentPermutation] (char tCurrentChar) -> void {
tCurrentPermutation += tCurrentChar;
});
std::cout << tCurrentPermutation << std::endl;
} while (std::next_permutation(tAlphabet.begin(), tAlphabet.end()));
}