I’m compiling c++ programs from the OS X Terminal:
> g++ a.cpp
I then the run the program from the terminal:
> ./a.out
What does the ./ syntax mean? Is this somehow related to ./run?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
.means “the current directory”, so./a.outmeans “the file nameda.outin the current directory”. If you were to type simplya.out, without the./, then the system would look through the directories on the path ($PATH) to find the program, instead of looking in the current directory.