Archived

This topic is now archived and is closed to further replies.

tom76

pragma???

Recommended Posts

tom76    122
I never came across this in my course....what is pragma? "I envy you, who has seen it all" "And I, young sir, envy you, who have yet to see it for the first time..." - Daniel Glenfield 1st October 2001

Share this post


Link to post
Share on other sites
Guest Anonymous Poster   
Guest Anonymous Poster
I believe pragma is a way to tell the compiler to handle things in a certain way. They depend on the compiler as to what pragmas there are.


....i think that''s right at least....

Share this post


Link to post
Share on other sites
tom76    122
an example in my resource

#pragma code_page(1252)

"I envy you, who has seen it all"
"And I, young sir, envy you, who have yet to see it for the first time..."
- Daniel Glenfield
1st October 2001

Share this post


Link to post
Share on other sites
Oluseyi    2111
It''s one of those lovely preprocessor directives (like #include, #define, etc) that controls compilation and linking. #pragma has a number of parameters (look it up in MSND) such as warning and comment:

// disable STL "identifier truncation in debug output" warning:
#pragma warning( disable : 4786 )
#include <stack>
// add library file to project:
#pragma comment( lib, "d3d8.lib" )
//
// source...
//
// restore warning C4786:
#pragma warning( default : 4786 )




I wanna work for Microsoft!

Share this post


Link to post
Share on other sites