What is #pragma | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is #pragma

preprocessor

22nd Jul 2016, 3:31 PM
Pradip Gangoda
Pradip Gangoda - avatar
3 Answers
+ 4
it's a faster #ifndef #define preprocessor. it's to make sure that you're not including headers twice which can result in some funky errors. the difference between the two is that all compilers recognize #ifndef, #define so it's fail proof. but not all compilers recognize #pragma, but it's a bit faster and neater
22nd Jul 2016, 4:11 PM
destro
+ 1
As I know, it's a preprocessor with very many neat functions.
23rd Jul 2016, 12:55 AM
_Geometry dash_ _Roh_ (AKA NovaRate0315)
_Geometry dash_ _Roh_ (AKA NovaRate0315) - avatar
0
note that it is not supported by default by all popular compilers.
21st Nov 2016, 8:33 PM
Alexander Pushkar
Alexander Pushkar - avatar