Programs like mario and greedy that I've completed will run but now the code can't be edited. I've been working on caesar and the part I've completed runs, but when I go back to gedit to edit the code I get a big blob of code that's mostly red with dire warnings about damage. In other words, ./greedy will run fine but if I try to open Greedy or another program in gedit I get this big red threat.

I've been away from the program for a couple of weeks so maybe I'm doing it wrong. I get the red blob when I open greedy, I get the code OK when I open greedy.c; but when I make changes in greedy.c and save it, nothing changes when I run it

  • 2
    Are you opening greedy or greedy.c? You should be opening the .c file.
    – Melde
    Oct 12 '14 at 19:17

It sounds like you are trying to open greedy in gedit. greedy is the executable file. If you want to edit the code, you must open greedy.c, make your changes, and then run make greedy to create the updated executable file.

Then, you can run ./greedy to see the updated code in action.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .