#pragma once

What means #pragma once and how is it included with classes?
it is a peprocessor directive. It says that the content of the current file is evaluated/compiled only once even if it's included more than once
okay, thank you, but why is it useful?
can you make an example?
can you make an example?
No, I don't know how to illustrate 'once'


okay, thank you, but why is it useful?
It shortens the compile time and avoid the error 'multiple definitions' if included more than once within the same file. Like 'include guard':

http://en.wikipedia.org/wiki/Include_guard
http://en.wikipedia.org/wiki/Pragma_once
Topic archived. No new replies allowed.