Hi,
yesterday I’ve finished lesson 2 in C++ about adding tekst via . I’ve saved it, compiled it, run program and everything was fine. Today I start lesson 3. I only added 2 new lines:
int a = 4;
std::cout << a;
But when I was compiling it there was a problem:
clang: error no input files
And from now it does not work anymore. Ok, maybe I did something wrong, but I don’t know what. I deleted whole project and start from the begining. I finished at the end of lesson 2 and was trying to compiling it again, but it still doesn’t work with the same error message:
But can you tell my why it was working at the beginning and then suddenly stops? I saved my project in the same location every time and was opening it by simply run Visual Studio Code and it was already loading. I was compiling and running it a few times and everything was fine until yesterday. I’m just curious what happened.
Yes, I’ve opened folder where I saved the game once to check what is going on in there ,during the project coding. Wow, one bad move is literally enough to break something…
Opening a folder or workspace is VS Code’s way of project files so will use that as the directory to open when launching a terminal.
By default VSCode uses the root directory as the default current working directory (cwd).
If you open your preferences (Ctrl + Shift + P) and search for “terminal.cwd” you can change it to be “${fileDirname}” which would mean it would open in whatever directory the current file you have open is in.