[ create a new paste ] login | about

Link: http://codepad.org/c8lUHukP    [ raw code | output | fork ]

C, pasted on Jul 28:
#include<stdio.h>



typedef Divide8Bits_t
{
 char firstHalf:4;
 char secondHalf:4;
}Divide8Bits;

char FIL_historyTable = 0 ;
int main()
{

char wlgroup =1; 
Divide8Bits *ptr = (Divide8Bits *)&FIL_historyTable;

if( !(wlgroup&0x1) )
ptr->firstHalf = 5; // example 
else
ptr->secondHalf = 10; // example 


}


Output:
1
2
3
4
5
6
7
Line 6: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
Line 9: warning: data definition has no type or storage class
In function 'main':
Line 16: error: 'ptr' undeclared (first use in this function)
Line 16: error: (Each undeclared identifier is reported only once
Line 16: error: for each function it appears in.)
Line 16: error: expected expression before ')' token


Create a new paste based on this one


Comments: