Compilers to be used on Linux box to build C & C++

Hallo,
Recently I have started working on a Linux box it has a default compilers.I tried to build a simple code using the default compilers.
compilers installed is at /usr/bin/cc
When I used same compilers to compile a C++ code error message is appearing.Then I tried to compile same code using gcc compiler placed at-/usr/bin/gcc.Also I tried with cpp compilers at - /usr/bin/cpp but error follows with some different messages.

Confusion I am having is can't I used same compilers to build both c & c++ code?
Why I am getting errors while using using cpp & gcc compilers?

Kindly help me to resolve this issue.

Some links regarding this topic:

GNU Compiler Collection - Wikipedia, the free encyclopedia
Standards - Using the GNU Compiler Collection (GCC)

Regards

Thanks franklin my issue is resolved. I will have to use g++ to build C++ code.

Can u also throw some light on usage of "cpp" compilers?

Regards

Why don't you Google for it?

Regards

Let's be good today :slight_smile:

cpp - Linux Command - Unix Command