I've been attempting to run some easy hello world programs on my command prompt in c++ and c# but after I compile them and attempt to run the .exe files the command jumps a line like it's going to output something, but never does. The cursor continues to blink after I try to run it but nothing happens after that. If I try using "ctrl+c" to close the command prompt, it doesn't work either. I'm not sure what's causing this to occur. I'm running windows 8.1. The C# code was compiled using csc and the C++ code was compiled using g++. The code is shown below:
hello.cpp:
#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
cout << "hello" << endl;
getchar();
}
hello.cs:
using System;
namespace HelloWorldApplication{
class HelloWorld{
static void Main(string[] args){
Console.WriteLine("Hello World");
Console.ReadKey();
}
}
}