C++ Stack and Queue

Hi everyone, may i know is that possible for us to generate permutation of a word using linked list, stack and queue concept? For example, “are”, its anagram will be are, aer, rea, rae, era, and ear. I have look through a lot of algorithm from website such as recursion , Johnson and Trotter algorithm.
So far my program, i just let read the words from text file inside the singly linked list. It is easy for me to add, insert and delete the node. However, i have no idea to generate my anagram :frowning:

class wordAnagram{
private:
string word;
queue anagram;
public:
void setWord(string);
void generate();
string getWord();
};

void wordAnagram::setWord(string wds){
word = wds;
}

string wordAnagram::getWord(){
return word;
}
void readFile(LinkedList &list, wordAnagram obj);

int main(){
wordAnagram obj;
LinkedList list;
readFile(list, obj);
list.displayList();
return 0;
}

void readFile(LinkedList &list, wordAnagram obj){
string filename, word;
ifstream inputfile;
do{
cout << "\tEnter Filename: ";
getline(cin, filename);
inputfile.open(filename.c_str());
// file validation
if(!inputfile)
cout << “\t\tFile does not exist ! \n \t\tPlease try again. \n\n”;
}while(!inputfile);
while(!inputfile.eof()){
inputfile >> word;
obj.setWord(word);
list.appendNode(obj);
inputfile.ignore();
}
inputfile.close();
}