-3

I am new to coding in C++ and I am not sure where I can compile a C++ program, I am learning C++ through a website that already has a place to compile the code built into it. I know how to compile a program by using these commands: g++ [program name].cpp -o [name you want to give] and then do ./[name you gave]. I want to know where I can compile my code outside of this website. Thanks.

Crafty
  • 11
  • 5
  • 2
    On your computer. I don't really understand the question. – tkausl Dec 08 '20 at 19:48
  • depending on your OS, you will need to download and install a compiler / IDE. – Thomas Dec 08 '20 at 19:50
  • You are permitted to choose the folders on your computer. If you have a windows PC you probably want to install Visual Studio 2019 Community and create c++ console projects inside the IDE. – drescherjm Dec 08 '20 at 19:50
  • The answers in the duplicate apply for installing the latest versions of GCC as well of course. – πάντα ῥεῖ Dec 08 '20 at 19:53
  • 1
    Personally, I recommend loading up a laptop with an open source (free) IDE and compiler, then going to a beach and compiling at the beach. Although you may have be cautious about the sand getting into the laptop. Perhaps the Redwood Forest in Northern California, U.S.A. – Thomas Matthews Dec 08 '20 at 20:02
  • When installing a GCC-or-similar compiler on Windows, I use a set-up too similar [to what's described here](https://stackoverflow.com/questions/30069830/how-to-install-mingw-w64-and-msys2) for it to be worth my time writing another answer. When not on Windows, there's usually a GCC-or-similar compiler already installed. – user4581301 Dec 08 '20 at 20:05
  • When visiting California, make sure to do it when A) it's not during a global pandemic and B) California's not on fire. That's made things tricky of late. – user4581301 Dec 08 '20 at 20:06

1 Answers1

0

There are lots of places you can write code for c++. Usually people will use IDEs such as

Visual Studio Code

Code::Blocks

CLion

Eclipse

CodeLite etc...

Eric Warburton
  • 329
  • 3
  • 11