Number of Primes in Range

Pages: 12
naveenmmenon wrote:
Do you also use repl.it? If not what do you use to code?


Certainly not.

I use the gnu compilers (g++ and gfortran) ... from the command line.
Do you also use repl.it? If not what do you use to code?


MS VS 2019
closed account (oG8qGNh0)
So there's c++ and g++?
g++ is the gnu c++ compiler.
So there's c++ and g++?

C++ is the name of the programming language, g++ is the name for the GNU C++ compiler. There is also gcc, which compiles C source code.

Difference between GCC and G ++ - GeeksforGeeks - https://www.geeksforgeeks.org/difference-between-gcc-and-g/

Having a compiler or IDE (integrated development environment) installed on your computer is more effective than using online compilers. Except for the most simple one file code.

An IDE works well for a beginner because it takes all the drudgery out of editing and compiling code. command-line compiling is old school, but a lot of long-term and professional programmers still use it.

Two popular and free IDEs are Visual Studio Community and Code::Blocks. I use both, I find using online compilers to be a hassle most of the time.
I think gcc is closer to the actual compiler. You can use any of g++, gcc, gfortran to compile a c++ program if you tell it the correct link libraries. Any of the following work:
g++ test.cpp
gcc test.cpp -lstdc++
gfortran test.cpp -lstdc++


Similarly, any of the following work in compiling a Fortran program:
gfortran test.f90
gcc test.f90 -lgfortran -lquadmath
g++ test.f90 -lgfortran -lquadmath


Online compilers are OK for demonstrating and comparing one-file code, with no file operations, so they have their uses as learning tools. But it's much more efficient and flexible to have your own files and compiler on your own machine.

I actually have two c++ and three fortran compilers on my own PC, with remote access for work to a few more.
Topic archived. No new replies allowed.
Pages: 12