How do I execute a.out?

Started by
11 comments, last by DarkHamster 21 years, 5 months ago
also if you "chmod +x " you won''t have to write ./ to execute your program as it sets the file as executable.
Advertisement
quote:Original post by necromancer_df
also if you "chmod +x " you won''t have to write ./ to execute your program as it sets the file as executable.

No connection. The fact that the ./ is required is due to the fact that the current working directory is by default no in the PATH environment variable.
In fact, if the file wasn''t already executable(gcc sets this) he wouldn''t be able to execute the file with or without the ./




God puts an apple tree in the middle of the Garden of Eden and says, do what you like guys, oh, but don''t eat the apple. Surprise surprise, they eat it and he leaps out from behind a bush shouting "Gotcha." It wouldn''t have made any difference if they hadn''t eaten it... because if you''re dealing with somebody who has the sort of mentality which likes leaving hats on the pavement with bricks under them you know perfectly well they won''t give up. They''ll get you in the end. -- Douglas Adams
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
yeah, my bad.

This topic is closed to new replies.

Advertisement