BrighterX11's blog

By BrighterX11, history, 18 months ago, In English

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++.

  • Vote: I like it
  • +1
  • Vote: I do not like it

| Write comment?
»
18 months ago, # |
  Vote: I like it +11 Vote: I do not like it

use vim

»
18 months ago, # |
  Vote: I like it +9 Vote: I do not like it

nvim

  • »
    »
    18 months ago, # ^ |
      Vote: I like it +1 Vote: I do not like it

    min CM required for actual use of it :)

    • »
      »
      »
      18 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      i’m cm and i still cant work out nvim for the life of me

»
18 months ago, # |
  Vote: I like it +13 Vote: I do not like it

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 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

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

    interesting question
    • »
      »
      »
      16 months ago, # ^ |
        Vote: I like it +17 Vote: I do not like it

      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 months ago, # |
  Vote: I like it 0 Vote: I do not like it

https://www.bloodshed.net/

Only works for windows though.

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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 months ago, # |
  Vote: I like it +1 Vote: I do not like it

notepad :).

»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

VS Code

»
16 months ago, # |
  Vote: I like it +1 Vote: I do not like it

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