No subject

Wed Aug 10 18:58:27 EEST 2011

"In order for #include guards to work properly, each guard must test
and conditionally set a different preprocessor macro. Therefore, a
project using #include guards must work out a coherent naming scheme
for its include guards, and make sure its scheme doesn't conflict with
that of any third-party headers it uses, or with the names of any
globally visible macros.

For this reason, many C and C++ implementations provide the
non-standard directive #pragma once."

Practic, sunt atat argumente pro, cat si contra si depinde de ce
preferi sa folosesti. Probabil se folosesc impreuna pentru ca, in
cazul in care compilatorul tine cont de #pragma once si poate avea ca
rezultat o viteza de compilare mai mare, atunci se foloseste #pragma.
Cel putin eu asta am inteles din cele 2 articole.

Silviu Popescu


More information about the rosedu-general mailing list