Here is my first C++14 code.
The code uses a function (a lambda function) whose argument is an auto.
To compile and run this code in Linux:
g++-5 -std=c++14 cpp14.cpp && ./a.out
Of course, you need to install g++-5 first in order to use C++14. In Ubuntu:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-5
No comments:
Post a Comment