Tag Info

New answers tagged


std::is_same is a C++11 feature. Ubuntu 12.04 has GCC 4.6.3, which has only incomplete C++0x (not yet C++11) support. You can try by specifying the standard: g++ --std=c++0x ...


To compile, you must, first, install a compiler. You can install g++ with the following command: sudo apt-get install g++ To run this command, enter in terminal, and paste this.


You don't need g++ to compile c++ programs if you have a set of c++ libs. Installed use the proper library flags. Say we want to use gnu's stdc++: gcc -o target source.cpp -L/usr/lib/architecture & distro dependent/ -lstdc++ and for a long time the guiding people of GNU/Linux where c oriented so until some what recently distros had to package a c ...


You will need something that can compile C++ files. The two main compilers in Linux are GCC and Clang. GCC is the default compiler in Ubuntu. GCC isn't installed by default because not everyone needs to compile a file. GCC is typically only used by developers. However, you can easily install it by installing the build-essential package, which is a ...


Found out how to fix this: add the following to my .pro file: linux-g++ | linux-g++-64 | linux-g++-32 { QMAKE_CXX = g++-4.8 QMAKE_CC = gcc-4.8 }


No this is not an error. The script runs and give the output which is "1". It is added to the same line the Terminal sees, and not making a new line after output through, so it seems like it isn't running. All you have to do is to add a new line character which is mostly the \n at the end of the output so that you print a new line to the end of the output, ...


There is nothing wrong with your code, but the auto specifier is present since c++11 version of the standard of C++ programming language. You must use g++ -std=c++11 a.cpp to compile your code.

Top 50 recent answers are included