#pragma directive

This is a discussion on #pragma directive within the C Programming forums, part of the General Programming Boards category; What is the significance of #pragma directive? I read it in a book and still dont seem to understand it ...

  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
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    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をこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,167
    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.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

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, 01: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, 04:50 AM

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