I'm currently learning c++, and I have trouble compiling it via my Macbook pro's terminal.
Below is a simple code that I wrote.
This is what I typed in the terminal: g++ -c -Werror hello.cc
My source code (named hello.cc) is stored in a folder called Hello program, which is stored in a folder called c++ programs, which is located on my desktop. When I type in g++ -c -Werror hello.cc into the terminal, this is what I get.
Conrados-MBP:~ conrados$ g++ -c -Werror hello.cc
clang: error: no such file or directory: 'hello.cc'
clang: error: no input files
I'm kind of desperate right now. It's hard to figure this out.
Below is a simple code that I wrote.
Code:
#include <cstdio>
//using namespace std;
int main (int argc, char** argv)
{
printf("Hello World!!!\n");
}
This is what I typed in the terminal: g++ -c -Werror hello.cc
My source code (named hello.cc) is stored in a folder called Hello program, which is stored in a folder called c++ programs, which is located on my desktop. When I type in g++ -c -Werror hello.cc into the terminal, this is what I get.
Conrados-MBP:~ conrados$ g++ -c -Werror hello.cc
clang: error: no such file or directory: 'hello.cc'
clang: error: no input files
I'm kind of desperate right now. It's hard to figure this out.