It's not a weird program. It's a simple C++ Hello World program, and for whatever reason there is no output to the terminal either in the terminal or in the output window. Here's my "code".
#include <cstdlib>
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
    cout << "Hello there peeps!";
    cout << endl;
    system("pause");
    return 0;
}
Using Netbeans 6.9 on Ubuntu 11.04 Natty
                        
Try installing xterm, that worked for me. (On fedora 18, but Ubuntu should be similar)
or