+ 2

Why Pragma's are used in C++??

!?🤔

24th May 2020, 7:39 AM
DEATH128
DEATH128 - avatar
5 odpowiedzi
+ 4
The preprocessor directive #pragma is used to provide the additional information to the compiler in C/C++ language. This is used by the compiler to provide some special features. 1.) #pragma startup Before the execution of main(), the function specified in pragma is needed to run. 2.) #pragma exit Before the end of program, the function specified in pragma is needed to run. 3.) #pragma warn Used to hide the warning messages. I hope this helps u
24th May 2020, 7:56 AM
Nikhil Maroju
Nikhil Maroju - avatar
+ 2
The pragma directive is used to access compiler-specific preprocessor extensions. Learn more about it here👇 https://www.tutorialspoint.com/hashpragma-directive-in-c-cplusplus
24th May 2020, 8:00 AM
Arsenic
Arsenic - avatar
+ 1
Hmmm🙂
24th May 2020, 11:04 AM
DEATH128
DEATH128 - avatar
0
Is there any pragma directive in other languages???
24th May 2020, 11:06 AM
DEATH128
DEATH128 - avatar
0
Just for instance, some of compiler features are not easily accessible from the interface (kind of), so using pragma directives can reach it with its extensions. Example : E/D warnings extras sollicited by (#pragma warn).
24th May 2020, 4:41 PM
Med Arezki
Med Arezki - avatar