compiler settings through source code

Hello! I would like to ask how to change compiler settings throught the source code. Especially, I want to make a online contest system to compile my source using C++11 standard. The testing system tells me I should type -std=c++0x or -std=gnu++0x but I have no idea where to write that. Should I use #pragma ? Thank you.
This is a command line argument for when you tell the compiler what to do.

If you're using a makefile, this goes in in the makefile.

If you're using an IDE (like code::blocks), then you'll find it in the project settings.
Since this is competition software, there should be a way to set the command line for the compiler.
Topic archived. No new replies allowed.