Thread: #pragma directive

  1. #1
    Registered User
    Join Date
    Jun 2009
    Location
    US of A
    Posts
    305

    Question #pragma directive

    What is the significance of #pragma directive? I read it in a book and still dont seem to understand it .

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    pragma directives are things specific to a certain computer architecure (hardware, or operating system).

    Here's MSDN's explanation and list: Pragma Directives (C/C++) (so those are all directives that are specific to compiling for Microsoft operating systems

  3. #3
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Pragma are compiler-specific stuff.
    Some of them are OS-specific.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. labels inside the code #pragma mark label
    By nacho4d in forum C++ Programming
    Replies: 6
    Last Post: 01-11-2009, 02:50 AM
  3. #pragma pack(1) workaround?
    By l3iggs in forum C Programming
    Replies: 5
    Last Post: 06-02-2008, 11:17 AM
  4. Programming a PIC 16F84 microcontroller in C
    By Iahim in forum C Programming
    Replies: 1
    Last Post: 05-13-2004, 02:23 PM
  5. what is a pragma comment?
    By Shadow12345 in forum C++ Programming
    Replies: 9
    Last Post: 11-25-2002, 05:50 AM