Code can run but doesn't show the Result in Eclipse.?
===

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.    

    #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 < 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 < strlen(output); i++)
            {
                if (output[i] == ' ')
                {
                    for (int j = i; j < 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 << "Enter name: "; cin.getline(name, strlen(name)); 
            cout << "Your name: " << name << endl;
        
            cout << "\n******* Q.A *******\n";
            char* qa  = Format2VN(name);
            cout <<  qa << endl;
        
            cout << "\n******* Q.B *******\n";
            char* qb = RemoveSpaceInside(name);
            cout << qb << endl;
            return 0;
        }

