As with the code in the lounge, you probably need to update your compiler or enable C++11 support on the one you're using. (Codeblocks is not a compiler.)

"It doesn't work" is useless in terms of getting people the necessary information to assist you. In the future, provide the errors emitted by the compiler (or a description of what happens when you run the code if it does compile.)