Hi,
I'm trying to add a int to the first four bytes of a char * and then later on I have to extract the int from the char *.
Example
char *foo = " number";
int num = 123456;
memcpy(foo,&num,4);
.........
int num2;
memcpy(num2,foo,4);
But this seems to segfault. What am I doing wrong?
hashbang