New answers tagged

0

The line: std::map <string, int> example; should be: std::map <std::string, int> example;


0

You can add a repository that contains the latest GCC and then simply install it via sudo apt install gcc (I've provided a link). Alternatively, you can build the latest GCC from source (this is just an example, read the README and INSTALL file): $> # download the latest gcc tar file and extract $> ./configure $> make $> sudo make altinstall ...


1

Actually, you're missing some steps... First of all, 1.58 is fine for other software in your version of Ubuntu. Indeed, if you're developing something yourself, then having the latest might be a good idea. What you downloaded from sourceforge should not be the "boost binary". It should be all source code. The steps you gave would setup the build's ...


0

The file not contain 16 columns, You see only 17 columns because your screen size. (You can stretch the file width and you will see ) The file contain 101 columns At this line: out << i << "\t"; You start your first column, And after than u start 100 loops, so, you get 101 columns.


0

You have to build it from source for 14.04. There are pre-built packages for latest ubuntu versions though Link


0

I have deleted old boost versions which I installed manually and followed to install new versions using libboost-all-dev. I have seen all the boost .so files of both old and new ones under /usr/lib/x86_64-linux-gnu/ or /usr/local/lib respectively. They were not deleted automatically when I remove the old boost packages using apt-get. But any how I managed to ...


0

It depends on your used type of C++ project and your eclipse version. I have a Makefile project in Eclipse Mars.2 (4.5) with CDT 8.8.1.201602051005) If you have a Makefile project and see the item C/C++ General-->C/C++ Make Projects in your project properties, you also have to go to the tab "Discovery Options" and add -std=c++11 to the Compiler invocation ...


0

The following works on windows and linux/unix: std::cout << "Press \'Return\' to end." << std::endl; cin.flush(); std::cin.get(); The first std::cin.flush() clears the input que, the next command waits for an input.


0

1. How to run .cpp from Terminal 1.1 Only “filename.cpp” file: Make filename # creates “main” application ./main #Run application on terminal Or g++ -Wall -o outputname filename.cpp #”-Wall” activates all Warnings ./main #Run application on terminal 1.2 Multiple .cpp files: 1.2.1 Selected .cpp files g++ -Wall filename1.cpp filename2.cpp -o output ...


0

They are located in /usr/include/x86_64-linux-gnu/libavcodec. A simple sudo find / -name "libavcodec"would have revealed this. The packages i have installed are: libavutil-dev:amd64 7:2.8.6-1ubuntu2 libswresample-dev:amd64 7:2.8.6-1ubuntu2 libavcodec-dev:amd64 7:2.8.6-1ubuntu2 libavformat-dev:amd64 7:2.8.6-1ubuntu2



Top 50 recent answers are included