Results 1 to 2 of 2

Thread: quick question

  1. #1

    Thread Starter
    Frenzied Member SomethinCool's Avatar
    Join Date
    Jan 2001
    Location
    Malvern, PA
    Posts
    1,407

    Talking quick question

    what does #pragma mean?

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    As you probably already know, a statement beginning with # in C/C++ code is a preprocessor directive. All the preprocessor directives get executed before the actual code starts to get compiled.

    There are a lot of different directives that are standard, ie they are implemented in all standards-compliant compilers. #pragma is a directive that can have different meaning on different compilers. For instance, "#pragma once" in a header file is valid if you are compiling in MS VC++ (it makes sure the file only gets #included once, which can also be done with #ifdef and #define in standard code). Any #pragma directive is a compiler-specific directive.
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width