Code can run but doesn't show the Result in Eclipse.?
<p>Why the example code below can run fine on Visual Studio. In Eclipse, NetBean or CodeBlock the code can run but can't show the Result? Thanks All.
Ex: input one string.
a/ Uppercase first letter.
b/ Remove spaces inside the string.    </p>

<pre><code>#include "iostream"
    #include "string.h"
    using namespace std;

    #define MAX 255

    //uppercase first letter
    char* Upper(char* input)
    {
        char* output = new char[MAX];

        bool isSpace = false;
        for (int i = 0; i &lt; strlen(input); i++)
        {
            output[i] = input[i];
            if (isSpace)
            {
                output[i] = toupper(output[i]);
                isSpace = false;
            }
            if (output[i] == ' ') isSpace = true;
        }
        output[strlen(input)] = '\0'; // end of the string
        output[0] = toupper(output[0]); // first character to upper

        return output;
    }
    //remove space inside the string
    char* RemoveSpaceInside(char* input)
    {
        char* output = new char[MAX];
        strcpy(output, input);

        int countWhiteSpace = 0;
        for (int i = 0; i &lt; strlen(output); i++)
        {
            if (output[i] == ' ')
            {
                for (int j = i; j &lt; strlen(output) - 1; j++) // move before
                {
                    output[j] = output[j + 1];
                }
                countWhiteSpace++;
            }
        }
        output[strlen(output) - countWhiteSpace] = '\0'; // end of the string

        return output;
    }

    int main()
    {
        char* name = new char[MAX];
        cout &lt;&lt; "Enter name: "; cin.getline(name, strlen(name)); 
        cout &lt;&lt; "Your name: " &lt;&lt; name &lt;&lt; endl;

        cout &lt;&lt; "\n******* Q.A *******\n";
        char* qa  = Format2VN(name);
        cout &lt;&lt;  qa &lt;&lt; endl;

        cout &lt;&lt; "\n******* Q.B *******\n";
        char* qb = RemoveSpaceInside(name);
        cout &lt;&lt; qb &lt;&lt; endl;
        return 0;
    }
</code></pre>
