Hello,
I'm trying to keep the firstLine char pointer to be independent from the spaces one but i don't manage to achieve that.
So by the end firstLine and spaces should point to different places in memory. How to achieve that?Code:char* firstLine = spaces; strncat(firstLine,s,m-rm); //that's it now I want the actual block on memory to be copied. s = malloc(sizeof(int)*(n-m)); j++; for (k=0; k<n; k++){ s[k] = A[j]; j++; } char* rString = s; A = spaces; strncat(A,rString,n-rm);



LinkBack URL
About LinkBacks


