Linux is generally not the C and C ++ compiler environment, you need to install it manually.
yum command to install
With Linux people should know what it means following sentence:
sudo -i
Install gcc:
yum install gcc
Asked whether, press Y and Enter.
Or (do not ask):
yum -y install gcc
Install g ++:
yum install gcc-c++
Asked whether, press Y and Enter.
Or (do not ask):
yum -y install gcc-c++