hi all, with the help from people in this forum i achieved this process when concerning arrays: as seen here: http://cboard.cprogramming.com/showthread.php?t=110716
I would like to achieve the same effect with structure's now but am receiving some errors.
Code:
#include <stdio.h>
#include <string.h>

typedef struct one
{
int x;
int y;
} point;

point top = {2,15};

struct two 
{ 
int a;
int b;
}blunt;

int main ()
{
memcpy(two, one, sizeof one);
return 0;
}
The errors are as follows:
error: ‘two’ undeclared (first use in this function)
error: (Each undeclared identifier is reported only once
error: for each function it appears in.)
error: ‘one’ undeclared (first use in this function.

I'm sure I am not referencing the source structure and destination structure, for memcpy () correctly, also is sizeof 'one' correct? Does the second structure have to be a typedef?