hello,
how can i solve this problem ........
error: invalid lvalue in assignment
Code:
if(c==0)
{
(char **)sTmp= &sd->source;
nl=sd->sbound;
}
this is my structure
Code:
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;
but when i am using like this
Code:
if(c==0)
{
sTmp= &sd->source;
nl=sd->sbound;
}
Code:
int ResolveHostIP(char* argv, struct _sd *sd)
{
int i,c=0,nC,nl;
struct hostent*hp;
struct _sTmp
{
char szTmp[MAXHOSTIP][MAXHOSTLENGHT];
}*sTmp;
Getting this warning
warning: assignment from incompatible pointer type
what will be the right syntax.