Z
Zach_C
Guest
Sorry to ask on such a simple question, I'm new to UNIX and Macs although I am enjoying my switch from Windows. Here is my problem. Whenever I right a program in C++ or C I can not get it to run. Here is everything I do. I write the code in pico and save it in the appropriate file format in this case pawn.c. I can see the file in Apple's finder and it has a big C on it so I am assuming I did not mess up here. I then run Terminal and change to the appropriate directory hit ls to make sure and finally compile by typing cc pawn.c -o pawn
It all seems to go well. I go right back to the terminal prompt Zach [], but when I type pawn I get a bad command. So I looked at it in finder and it is just the standard white piece of paper icon and does not have a file extension when I go to get info.
Excuse my ignorance or references to Windows machines but shouldn't it be a .exe? Am I messing up in compiling. I checked online tutorials and they say to do it the way I did but my attempt was in vain. Any help is greatly appreciated.
It all seems to go well. I go right back to the terminal prompt Zach [], but when I type pawn I get a bad command. So I looked at it in finder and it is just the standard white piece of paper icon and does not have a file extension when I go to get info.
Excuse my ignorance or references to Windows machines but shouldn't it be a .exe? Am I messing up in compiling. I checked online tutorials and they say to do it the way I did but my attempt was in vain. Any help is greatly appreciated.