Can't run a program (Permission denied)


#1

I created the file water.c in my workspace, then edited it. After last “make water” and “./water.c” commands I got this:
“bash: ./water.c: Permission denied”.
What are the reasons of it? And how i can fix it?
Thanks for help!


#2

Easy: You’re trying to execute your C code rather than the compiled program!

Having done make water you should find a compiled program called water (without the .c) in your directory, and that’s executable with

./water

That should be all you need.


#3

Thank you so much! I already found this stupid mistake. Shame on me :slight_smile: