Reqd clarification

This is a discussion on Reqd clarification within the C Programming forums, part of the General Programming Boards category; Can someone tell me what is difference between using Code: #pragma pack(push,aaa, 1) struct check { int a; char b; ...

  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
    Captain Crash brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,239
    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, 12:06 AM
  2. exercise clarification truth table
    By curlious in forum C++ Programming
    Replies: 1
    Last Post: 12-18-2003, 06: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, 06:22 PM
  5. A little clarification?
    By Dr Nick in forum C++ Programming
    Replies: 2
    Last Post: 06-20-2002, 01:47 PM

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