The #error and #pragma Preprecessor directives

This is a discussion on The #error and #pragma Preprecessor directives within the C++ Programming forums, part of the General Programming Boards category; I read what's written about then in my C++ text book ( Deitel # Deitel 3rd edition ), but still ...

  1. #1
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953

    The #error and #pragma Preprecessor directives

    I read what's written about then in my C++ text book ( Deitel # Deitel 3rd edition ), but still I couldn't understand them...
    Can explane them for me, please... Or give me an example...
    Thanks in advace...
    none...

  2. #2
    moi
    moi is offline
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    what's there not to understand? #error halts compilation. the end. as for #pragma, it does nothing in vanilla ansi C/C++, but various compilers use it as a way to add various features. consult your compiler's documentation for info about #pragmas you can use.
    hello, internet!

  3. #3
    Registered User rmullen3's Avatar
    Join Date
    Nov 2001
    Posts
    330

    ~

    #error ends compilation to report an error.
    #pragma performs compiler specific tasks.

  4. #4
    Just a Member ammar's Avatar
    Join Date
    Jun 2002
    Posts
    953
    Thanks alot, I'll check the help file in my compiler...
    none...

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21