2
2b|!2b==?
I have a struct which holds an array of structs like this
struct Struct1
{
struct Struct2* strt2 ;
....
};
I allocate a predetermined size to hold n structs of type Struct2.
However, Struct2 represents data that is coming in from a feed. I want
to have an operation that "shifts" the array elements down by one when a
new packet (of type Struct2) is received, so that Struct1 ALWAYS
contains the latest n values.
memove comes to mind, but I'd appreciate some pointers (pun intended)
struct Struct1
{
struct Struct2* strt2 ;
....
};
I allocate a predetermined size to hold n structs of type Struct2.
However, Struct2 represents data that is coming in from a feed. I want
to have an operation that "shifts" the array elements down by one when a
new packet (of type Struct2) is received, so that Struct1 ALWAYS
contains the latest n values.
memove comes to mind, but I'd appreciate some pointers (pun intended)