I'm a begginer in programming and new to everything.
I am trying to use the Mac terminal to run my C++ program. My file name is Learning
and my executable file is main.cpp
.
I've tried:
$ g++ -o Learning main.cpp
$ ./main
But when I command the first line it returns:
clang: error: no such file or directory: 'main.cpp'
clang: error: no input files
This gives me the error message so I tried another way:
$ g++ main.cpp
$ ./a.out main.cpp
But it still gives me the same error message. I'm lost. Does anyone have any anwsers?
P.S. Thanks for taking the time to read this and potentially help me.