scoped enums only available with -std=c++0x or std=gnu++0x
Hi - First post, so please be gentle with me if I breached any rules or anything... Thanks.
I am reading C++ Without Fear (second edition). Near the end of chapter 10 I am tasked with updating a "rock Paper scissors" game.
Now, I understand the code and I am pretty sure that I can complete the tasks set, however, when I bring the example program into Dev-C++ OR Code:Blocks I am unable to compile it. Here's the first part of the code - The GCC compiler stops at the "enum" line:
Code:
#include <iostream>
#include <string>
#include <ctime>
using namespace std;
enum class Choice { rock, paper, scissors };
Dev-C++ says:
expected identifier before "class".
This is very frustrating as this is the IDE recommended by the book... and the compiler came bundled with it.
As a test I tried Codeblocks and codeblocks tells me:
scoped enums only available with -std=c++0x or std=gnu++0x
Am I right in thinking that I have out of date compiler that doesn't understand C++0x instructions? and if so, can someone point me in the right direction to get one please?
Thanks in advance,
B.
(I hope this is in the right section of the forum, if not please accept my apologies.)