char strarr[5][10];
when I use
strcpy(strarr[0], src);
try to copy contents from src to strarr[0] .I got seg fault.
Is this wrong?
Thanks!
Unless you show us more code we can only assume src is more than the space availabe. Also it may be that src is not NUL-terminated.
src
NUL
1.4m articles
1.4m replys
5 comments
56.9k users