Hi I am doing an assignment for C++ and my teacher unfortunately can't teach me anything about C++ so I have to resort to the internet to help me out.
I'd appreciate a simple, easy way to output all of the permutations of a list, for example, if list x has 3 different values of [1,2,3], output=[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1] etc... the list does not necessarily have to be in that order, just needs to output all of the different combinations of 1, 2, 3 in a list. that's all. I've looked online to figure out how to do this with no luck understanding much. I've seen people use vectors for this and a bunch of other things that I have about 0% understanding of. I'd love to just copy and paste others' codes but that won't help get anywhere for this class, or anywhere with C++ since I am the only one voluntarily learning this language. So please try to explain it in layman's terms as much as possible. I am using C++11 if that helps.
This is about as far as I got myself
std::cout << "\nPart 2: Enter a list of 3 numbers, press enter after each value: \n";
std::list<int> mylist1;
int v1;
int v2;
int v3;
std::cin >> v1 >> v2 >> v3; //input that will go into the list
mylist1.push_front(v1);
mylist1.push_back(v2);
mylist1.push_back(v3);