Displaying all permutations of a string
Note that using the standard library function std::next_permutation from the header &lt;algorithm&gt;, your code can more or less be reduced to:

#include &lt;algorithm&gt;
#include &lt;iostream&gt;
#include &lt;string&gt;

int main()
{
    std::string s;
    std::cout &lt;&lt; "Enter the amino acid string: ";
    std::cin &gt;&gt; s;
    std::cout &lt;&lt; "\nThe permutations of the given string:\n";

    std::sort(s.begin(), s.end());
    do
    {
        std::cout &lt;&lt; s &lt;&lt; '\n';
    } while(std::next_permutation(s.begin(), s.end()));
}


Note that the iterable (the string in our case) needs to be sorted for the call to std::next_permutation to work, hence the call to std::sort beforehand.



That said, solving your problem in a more idiomatic manner might be interesting, but there are some more things you may want to know if you want to write idiomatic C++ in the future:


You don't need to write your own swap function. The standard already provides std::swap to swap any two values.
using namespace std; is often considered bad practice. While it shouldn't matter in your case, using it in a header file will drag every name from the std:: namespace into the global namespace in every file including this header file. Generally speaking, unless you know what you're doing, avoid this construct and fully qualify every name from the standard library with std::.
You could use some additional spacing. Don't hesitate to separate your functions by empty lines and to add some more spaces between your functions parameters. It will make your code easier to read. Also, try to be consistent when you indent stuff; use the same number of spaces for indentation everywhere.