I tried to run a c++ file with the mac terminal, but it gave me the error as shown below:
Does anyone have any idea why this is happening?
If you do this gcc test.cpp
you will get executable called a.out
, and to run it you type:
./a.out
to get executable called test
you have to run g++ test.cpp -o test
now you can run this:
./test