To create a C++ project in Visual Studio, open Visual Studio, click on "Create a new project," select "Console App" in C++, and follow the prompts.
To compile and run a C++ program in the terminal, use the command g++ filename.cpp -o outputname to compile and ./outputname to run.
g++ filename.cpp -o outputname
./outputname