Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years ago.
#pragma once in SerialPipe.cpp
Hi,
Maybe this just shows my ignorance about c++ but what does the #pragma once mean in SerialPipe.cpp.
As far as I understand it is used in header files to prevent multiple inclusion. Is this meant to be here? If so what does it do?
Thanks in advance Richard
Question relating to:
1 Answer
10 years ago.
it is a multiple header inclusion guard.
http://en.m.wikipedia.org/wiki/Pragma_once
its a left over, we can remove.
http://infocenter.arm.com/help/topic/com.arm.doc.dui0491c/DUI0491C_arm_compiler_reference.pdf section 5.91 - as you say for header files usually though...
posted by D J 17 Dec 2014as i said it can be removed. it is not needed.
posted by Michael Ammann 17 Dec 2014