tcpdump mailing list archives
Re: Error in the "strcat" function
From: Guy Harris <guy () alum mit edu>
Date: Mon, 19 Feb 2007 00:24:42 -0800
Adelmo Silva wrote:
But, if I wrote: strcat(string1, &ips1[i]); Another error happen: teste1.c:294: error: incompatible types in assignment
So, on line 294 of testel.c, did you write
strcat(string1, &ips1[i]);
or did you write
string1 = strcat(string1, &ips1[i]);
I suspect you wrote
string1 = strcat(string1, &ips1[i]);
in which case you made a mistake, and the compiler correctly told you so
- you cannot assign a "char *", which is what the return value of
strcat() is, to an array.
You need to write just
strcat(string1, &ips1[i]);
with no assignment.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.
Current thread:
- Patch to release File Descriptors in pcap-dag.c Florent . Drouin (Jan 30)
- Re: Patch to release File Descriptors in pcap-dag.c Guy Harris (Jan 31)
- Re: Patch to release File Descriptors in pcap-dag.c Florent . Drouin (Feb 01)
- Error in the "strcat" function Adelmo Silva (Feb 01)
- Re: Error in the "strcat" function Jin YunYe (Feb 02)
- Re: Error in the "strcat" function Adelmo Silva (Feb 02)
- Re: Error in the "strcat" function Guy Harris (Feb 02)
- Re: Error in the "strcat" function Adelmo Silva (Feb 03)
- Re: Error in the "strcat" function Guy Harris (Feb 19)
- Re: Patch to release File Descriptors in pcap-dag.c Florent . Drouin (Feb 01)
- Re: Patch to release File Descriptors in pcap-dag.c Guy Harris (Jan 31)
- BPF ADVANCED FILTERS Adelmo Silva (Feb 02)
- Re: BPF ADVANCED FILTERS Richard Bejtlich (Feb 02)
- Re: Patch to release File Descriptors in pcap-dag.c Guy Harris (Feb 07)
