hi !
In my program I have a structure as shown below:
struct data
{
int a;
char *b;
long c;
}str;
i have assigned the following values to it:
strcpy(str.b,"John");
str.a=10;
str.c=123435;
The client is tryin to send struct data to the server using
send(sock,(char * )&str,sizeof(str),flag);
At the server side the data is read using the following:
recv(sock,(char *)&str,sizeof(str),flag);
but when i print the values on to the screen only the values of a and c get printed and b does not get printed.
The server also contains the structure.
i cant figure out y this is happening. any help is appreciated.
thanx