Compiling constexpr when using g++

I have installed Visual Studio Code as per first section and am running on MacOS so am using g++

This is the command I used to compile:

g++ -std=c++14 main.cpp -o bullcowgame

If you don’t have the -std=c++14 then you will get error unknown type name 'constexpr'.

Privacy & Terms