So I am getting an error that says:
"passing arg1 of 'strncpy' makes pointer from integer without a cast"
Here is the fragment of code causing the problem could someone please suggest what is going on: while (pch!=NULL){
pch=strtok(NULL," ");
if (pch !=NULL && pch!= "="){
int index=0;
...where pch is a char array declared as: char pch[MAX_FORMALPARAMETER+1];
memset (pch,0,MAX_FORMALPARAMETER);
and formalParameters is also declared and memset like pch
If I 'make' my program I get that warning. If I run it with an input file I get a 'segfault' that with the use of 'ddd' debugger points me to this 'strncpy'..any idea's anyone?
thanks
Abhi
because parameter 1, i.e. formalParameters[index] looks strange. what i mean is , it should be passed as strncpy(formalParameters,pch, MAX_NAME);
if its not a double dimensional array.