Hi,
I keep getting two invalid lvalue in assignment errors. here's what my code looks like:
[code=c]pthread_t msg_receive(cha r *sbuffer, int *maxlen) {
// get the values for sbuffer and maxlen
strcpy(sbuffer, current->message);
&maxlen = current->messagelen; // invalid lvalue here
}
[/code]
current is a struct ptr with these attributes:
[code=c]current {
char *message;
int messagelen;
char *replymsg;
int replylen;
}[/code]
the other place i'm getting the lvalue error is basically the same. me trying to deference an int to assign it a value from a struct.
I'd really appreciate if someone can tell me what i've done wrong.
thanks.
I keep getting two invalid lvalue in assignment errors. here's what my code looks like:
[code=c]pthread_t msg_receive(cha r *sbuffer, int *maxlen) {
// get the values for sbuffer and maxlen
strcpy(sbuffer, current->message);
&maxlen = current->messagelen; // invalid lvalue here
}
[/code]
current is a struct ptr with these attributes:
[code=c]current {
char *message;
int messagelen;
char *replymsg;
int replylen;
}[/code]
the other place i'm getting the lvalue error is basically the same. me trying to deference an int to assign it a value from a struct.
I'd really appreciate if someone can tell me what i've done wrong.
thanks.
Comment