saur
Member level 2
- Joined
- Feb 23, 2012
- Messages
- 45
- Helped
- 2
- Reputation
- 4
- Reaction score
- 2
- Trophy points
- 1,288
- Activity points
- 1,621
Just clear that an array is a constant pointer... if u define
int a[10];
actually a[10] is a vector, not an array. A vector is a one dimensional "array"!
Just clear that an array is a constant pointer... if u define
int a[10];
i
Tey[sic] just stored the address of each row in a 1D array...
Code C - [expand] 1 2 3 4 5 6 A = 0x8000 is an address &A = 0x8000 is an address A[0] = 0x8000 is an address A[1] = 0x8002 address of next row A[2] = 0x8004 adress of third row A[1][1] = a value of second row second column
I think I need too study arrays again.
And as an additional help can you guys suggest any book for C which would be very useful and is extremely good.
Once again, Thanks.
"unsigned int *sp;
sp = (unsigned int *)&frame->data[0];
"
where
"typedef struct os_frame { /* << System frame buffer structure >> */
U16 length; /* Total Length of data in frame */
U16 index; /* Buffer Position Index */
U8 data[3]; /* Buffer data (protocol headers + data) */
} OS_FRAME;
OS_FRAME *frame, input;
frame = &input;
"
sp = (unsigned int *)&frame->data[0];
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?