Блог пользователя BrighterX11

Автор BrighterX11, история, 18 месяцев назад, По-английски

Is there any light/simple IDE for C++? VS Code seems a bit heavy just for the sake of competitive programming. Code::Blocks is not updated. I don't want to use text editors like Sublime Text for now as I am still learning C++.

  • Проголосовать: нравится
  • +1
  • Проголосовать: не нравится

»
18 месяцев назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

use vim

»
18 месяцев назад, # |
  Проголосовать: нравится +9 Проголосовать: не нравится

nvim

»
18 месяцев назад, # |
  Проголосовать: нравится +13 Проголосовать: не нравится

To run C++, all you need is a text editor and a compiler (and a shell where you can run the executable). Rather than relying on complex IDEs, I would recommend getting yourself to get familiar with a simple setup as follows.

  1. Install g++ and any text editor of your choice.
  2. Write code in the text editor and save it (for example, as main.cpp).
  3. Go to the directory where you saved the file and run g++ main.cpp (or you can give the absolute path of main.cpp instead of just main.cpp with the advantage that you don't need to be in the directory where main.cpp is, but it is slower to write).
  4. If you are on Windows, run whatever .exe was generated, and if on Linux/Mac, run ./a.out

Eventually you can go on to use different build systems and maybe even some scripts that make it easier. It is quite important to learn the basics of how compilation etc. happens, else in competitions where you can't use your own setup, you'll be completely lost. I use vim + make for running C++, and it is pretty good in my opinion, since vim (or at least vi) is present in all Linux distributions (and in pretty much every competition's setup) and make is installed by build-essential and hence present on almost all systems (and is needed for building a lot of fundamental tools on Linux).

  • »
    »
    16 месяцев назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Can you share your entire setup (like scripts and workaround) or more precisely a video explaining them?

    interesting question
    • »
      »
      »
      16 месяцев назад, # ^ |
        Проголосовать: нравится +17 Проголосовать: не нравится

      I just use a terminal, vim (with a couple of plugins for clangd and snippets) and a Makefile. I don't think you'll really gain anything from that minimalist setup apart from learning some new things. Maybe it's better to compete with a setup that's easy to set up from scratch, if you're looking at ICPC and other onsite competitions.

»
18 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

https://www.bloodshed.net/

Only works for windows though.

»
18 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Use Code Blocks, it has C++17 in newest version, I think it is enough for start in CP. In future, you can use sublime or any text editor and compile code using terminal.

»
18 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

notepad :).

»
18 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

VS Code

»
16 месяцев назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

After using Codeblocks, you won't be disappointed:)