Thread: The #error and #pragma Preprecessor directives

  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
    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