Search code examples
c++commandprompt

Trying to compile a cpp file but command prompt saying file not found


picture command prompt

I have downloaded the c++ compiler from MinGW also set the environment variables


Solution

  • '<' and '>' are research characters for redirection and are not to be used in file names.

    most likely in this case it is trying to read input from hello_world as it would be seeing < hello_world but not find the file

    The > p.cpp would be attempting to write any output to p.cpp, so may have replaced what you had in that file.