hello,
how can i solve this problem ........
error: invalid lvalue in assignmentthis is my structureCode:if(c==0) { (char **)sTmp= &sd->source; nl=sd->sbound; }
but when i am using like thisCode:struct _sd { char source[MAXHOSTIP][MAXHOSTLENGHT]; char dest[MAXHOSTIP][MAXHOSTLENGHT]; int sbound; int dbound; }; struct _tcp_udp { struct _sd sd; int ports[MAXPORTS]; }; struct _tcprst { struct _sd sd; int seq; int source_port; int dest_port; }; struct _icmp_igmp { struct _sd sd; }; struct listofip { struct _tcp_udp tcp; struct _tcp_udp udp; struct _icmp_igmp icmp; struct _icmp_igmp igmp; struct _tcprst trst; }ltp;
Code:if(c==0) { sTmp= &sd->source; nl=sd->sbound; }Getting this warningCode:int ResolveHostIP(char* argv, struct _sd *sd) { int i,c=0,nC,nl; struct hostent*hp; struct _sTmp { char szTmp[MAXHOSTIP][MAXHOSTLENGHT]; }*sTmp;
warning: assignment from incompatible pointer type
what will be the right syntax.



LinkBack URL
About LinkBacks



