How do you go down in the terminal?

I’m trying to code in C++, but when I need to compile and execute, I need to return a line. To return, as far as I know, you press enter, but enter only causes the program to execute my unfinished code. This isn’t a big deal, its just a minor annoyance.

Hi @kearkelk

I’m struggling to understand what you’re doing, tbh.

If you’re working through the Codecademy C++ material, “compile” and “execute” are two different actions in the learning environment. You compile with g++ my_code.cpp and execute it with ./a.out for example.

These would already be two separate commands* to the terminal, so it would (assuming no errors) look like:

$ g++ my_code.cpp
$ ./a.out
some output from your code is here!
$

If that’s not what you’re talking about, then I’m genuinely confused. Unless you can elaborate a bit more about what you’re doing and how, with a screenshot maybe, I’m lost. :frowning:

* Unless you’re familiar enough with bash to know you could do $ g++ my_code.cpp; ./a.out for the same result.