K
karunesh
why this #pragma use very extnsivly
please tell me the usses
thaks!!
Regards,
Karuensh
please tell me the usses
thaks!!
Regards,
Karuensh
why this #pragma use very extnsivly
Thanks for a beautiful Explation .
as i know in inclusion gard we use
#ifndef _SOME_
/* Header file body */
#endif
and i remmber some where i read that #pragma can be use for structure
paddsing .
some where i also read that its also use to change in entery point of
the programe.
can you put focus on the same ..
how this can be handle
karunesh said:Dear Erik ,
Thanks for a beautiful Explation .
as i know in inclusion gard we use
#ifndef _SOME_
/* Header file body */
#endif
why this #pragma use very extnsivly
please tell me the usses
thaks!!
Regards,
Karuensh
So you haven't worked with OpenMP or embedded environments? The latterOndra said:karunesh napsal:
Do not use #pragma. If you think you need it, you are 99% wrong and you
really do not need it. #pragma is great way how to create code with low
maintanability.
#pragma once
/* Header file body */
Note that your way is portable. But the one nice thing about the
pragma approach is that it avoids the error when you cut and paste your
code to another file, and forget to rename _SOME_, then your header
files clash. (I.e., you can just put that one line, and don't have to
edit it for each header file.)
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.