Mac Running C++ from Terminal

gamestriker

macrumors regular
Original poster
Dec 18, 2004
174
0
I started learning C++ a year ago, on a Unix machine, and I learned how to compile and run on a normal Unix console. I tried to pick up were I left off a year ago, but when I tried doing 'a.out' in Terminal to run the compiled program, it threw an error at me saying 'command not found'. Is there another way to run it off the Terminal?

I appreiciate the help.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,015
315
Harrogate
If you get bored of the ./ stuff then you need to add ./ to your PATH environment variable so the current directory will always be in the search path for executables. You can do this in your .profile, .cshrc or whatever.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.