Terminal issues

Feb 11, 2011 at 5:49pm
I work on a mac, and use Terminal to run my programs. For some reason my terminal stopped working. It allows me to type, but no response is there. It's just a blank screen. I think there are two possibilities of why it has stopped working.

1. I tried to put in a sudo command. The actual text was:
sudo rm -rf /Users/(username)/Desktop/Gobble

I think this did something to my terminal in a way that didn't allow the CPU to respond.

2. I tried to use an fstream command.

This is what I wrote:

1
2
3
4
5
6
7
8
9
10
11
#include <iostream>
#include <fstream>
using namespace std;

int main () {
  ofstream myfile;
  myfile.open ("example.txt");
  myfile << "Writing this to a file.\n";
  myfile.close();
  return 0;
}


I would like a solution to this problem please, and if you know, what caused it.

Thank you.
Last edited on Feb 11, 2011 at 5:52pm
Feb 11, 2011 at 6:14pm
Well, that program wouldn't be outputting anything, so you shouldn't see anything...however, after it's done I don't see why the terminal would stop responding to other input.
Topic archived. No new replies allowed.