Thread: Reqd clarification

  1. #1
    Registered User
    Join Date
    Sep 2005
    Posts
    12

    Reqd clarification

    Can someone tell me what is difference between using

    Code:
    #pragma pack(push,aaa, 1)
    
    struct check 
    {
    	int a;
    	char b;
    };
    
    #pragma pack(pop,aaa)
    &

    Code:
    #pragma pack(1)
    
    struct check 
    {
    	int a;
    	char b;
    };
    in both case size is 5. what exactly is the difference?

  2. #2
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459

  3. #3
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    In one case you can pop the pragma (go back to default packing). In the other case you can't.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need a clarification here
    By bithub in forum A Brief History of Cprogramming.com
    Replies: 30
    Last Post: 12-27-2004, 01:06 AM
  2. exercise clarification truth table
    By curlious in forum C++ Programming
    Replies: 1
    Last Post: 12-18-2003, 07:28 PM
  3. pointer clarification
    By DMaxJ in forum C Programming
    Replies: 1
    Last Post: 06-04-2003, 09:14 AM
  4. Pointer clarification
    By Spectrum48k in forum C++ Programming
    Replies: 4
    Last Post: 02-23-2003, 07:22 PM
  5. A little clarification?
    By Dr Nick in forum C++ Programming
    Replies: 2
    Last Post: 06-20-2002, 01:47 PM