P

Pragma once

Directive in C and C++ provided as a language extension

In the C and C++ programming languages, #pragma once is a non-standard but widely supported preprocessor directive designed to cause the current header file to be included only once in a single compilation. Thus, #pragma once serves the same purpose as #include guards, but with several advantages, including less code, avoidance of name clashes, and sometimes improvement in compilation speed.

Nº Q307472 ★★

Uncommon · Literature

Pragma once

Directive in C and C++ provided as a language extension

In the C and C++ programming languages, #pragma once is a non-standard but widely supported preprocessor directive designed to cause the current header file to be included only once in a single compilation. Thus, #pragma once serves the same purpose as #include guards, but with several advantages, including less code, avoidance of name clashes, and sometimes improvement in compilation speed.

Last price

—

Floor price

—

7-day median

—

30-day sales

0

30-day range

—

In circulation

0

Price history

Show table
Datemedian LowHighsales

Sales history

Last sale
—
30-day average
—
30-day low
—
30-day high
—
Sales 7d
0
Sales 30d
0

No sales yet.

Anonymous sales: no buyer or seller shown. Figures count player-to-player sales only.

From Wikipedia

In the C and C++ programming languages, #pragma once is a non-standard but widely supported preprocessor directive designed to cause the current header file to be included only once in a single compilation. Thus, #pragma once serves the same purpose as #include guards, but with several advantages, including less code, avoidance of name clashes, and sometimes improvement in compilation speed. While #pragma once is available in most modern compilers, its implementation is tricky and might not always be reliable. Modules, introduced in C++20, eliminates the necessity of #pragma once, due to not being handled by the preprocessor. Modules can only be imported at most one time into a translation unit.

Text: Wikipédia, CC BY-SA 4.0. ·

Related cards

View card

Confirmation