# apt-cache search gcc | grep 'c++'
avr-gcc-c++ - C++ support for gcc for AVR
gcc-c++-common - Common symlinks for the GNU C++ Compiler
libstdc++3.3 - GNU C++ library
gcc3.4-c++ - C++ support for gcc
gcc4.1-c++ - C++ support for gcc
gcc4.1-objc++ - Objective-C++ support for GCC
gcc4.3-c++ - C++ support for gcc
gcc4.3-objc++ - Objective-C++ support for GCC
gcc4.4-c++ - C++ support for gcc
gcc4.4-objc++ - Objective-C++ support for GCC
libstdc++4.4 - GNU Standard C++ library
libstdc++4.4-debug - GNU Standard C++ library with debugging information
mingw32-gcc-c++ - MinGW Windows cross-compiler for C++
mingw32-gcc-objc++ - MinGW Windows cross-compiler support for Objective C++
# apt-get install gcc4.4-c++
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
gcc4.4-c++
0 upgraded, 1 newly installed, 0 removed and 39 not upgraded.
Need to get 2957kB of archives.
After unpacking 8787kB of additional disk space will be used.
Get:1
ftp://ftp.altlinux.org i586/classic gcc4.4-c++ 4.4.1-alt3 [2957kB]
Fetched 2957kB in 3s (853kB/s)
Committing changes...
Preparing... ########################################### [100%]
1: gcc4.4-c++ ########################################### [100%]
Running /usr/lib/rpm/posttrans-filetriggers
Done.
# g++ --version
i586-alt-linux-g++ (GCC) 4.4.1 20090725 (ALT Linux 4.4.1-alt3)
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# exit
$ cat > t.cc <<EOF
> #include<iostream>
>
> int main (void ) { std::cout << "123" << std::endl; return 0; }
> EOF
$ g++ -o t t.cc
$ ./t
123
$