thanks tabstop, twomers and elysia.
I'm presuming this works now, i got your hint tabstop.
I changed the second structure to a typedef, referenced 'top' in memcpy() correctly and created another variable for the second structure so i could read the values into it. Thanks again. btw is this ok?
Code:
#include <stdio.h>
#include <string.h>
typedef struct one
{
int x;
int y;
} point;
point top = {2,15};
typedef struct two
{
int a;
int b;
} blunt;
blunt bottom;
int main ()
{
memcpy(&bottom, &top, sizeof top);
printf("The second structure values are %d and %d\n", bottom.a, bottom.b);
return 0;
}
Also is there a way to show my problem has been solved i.e. a forum feature - or even a thank system?