What do you mean by #pragma once

Questions by pbchaudhari   answers by pbchaudhari

Showing Answers 1 - 3 of 3 Answers

baseersd

  • Sep 18th, 2007
 

#pragma once is a non-standard but widely supported preprocessor directive designed to cause the current source file to be included only once in a single compilation. Thus, #pragma once serves the same purpose as include guards(#ifndef, #endif) but in less code and without the possibility for name clashes.


Please see the links:-

http://en.wikipedia.org/wiki/Include_guard
http://en.wikipedia.org/wiki/Pragma_once

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions