trying to sort a simple string in c++
<pre><code>#include "stdio.h"
#include "conio.h"
#include &lt;iostream&gt;

using namespace std;

int main (void) 
{
    char my_char[] = "happy birthday";

    int i;

    bool j=false;
    char my_char_temp[1];

    do
    {
        for (i=0;i&lt;sizeof(my_char)-2;i++)
        {
            j=false;
            if (my_char[i+1] &lt; my_char[i])
            {
                my_char_temp[0]=my_char[i+1];
                my_char[i+1] = my_char[i];
                my_char[i] =  my_char_temp[0];
                j=true;
            }
        }

    }while (j);

    cout &lt;&lt; my_char;
}
</code></pre>

<p>What am I doing wrong?</p>

<p>I'm just trying to sort the letters within the char.</p>

<p>The output I get is completely wrong.</p>
