#include "stdafx.h"
#include <string>
#include <algorithm>
#include <iostream>

void func(const char *str_in)
{
	std::string str(str_in);
	std::sort(str.begin(),str.end());
	do 
	{
		std::cout<<str<<std::endl;
	}while (std::next_permutation(str.begin(),str.end()));
}

int _tmain(int argc, _TCHAR* argv[])
{
	func("cab");
	return 0;
}

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-15
  • 2021-10-22
  • 2022-01-12
猜你喜欢
  • 2021-09-03
  • 2021-04-22
  • 2021-08-25
  • 2022-12-23
相关资源
相似解决方案