B
boltar2003
Hello
I want to use some code that has a pointer to an array type so I can use pointer
arithmetic on it, but I want to point it to a malloc'd char*. The code compiles
under gcc but with a warning about the assignment. My problem is I can't figure
out how to cast the char* to the array type to remove the warning.
eg:
char (*p)[100];
char *s;
p = s;
How would I write the cast so I could remove the warning from the "p = s" line?
Thanks for any help
B2003
I want to use some code that has a pointer to an array type so I can use pointer
arithmetic on it, but I want to point it to a malloc'd char*. The code compiles
under gcc but with a warning about the assignment. My problem is I can't figure
out how to cast the char* to the array type to remove the warning.
eg:
char (*p)[100];
char *s;
p = s;
How would I write the cast so I could remove the warning from the "p = s" line?
Thanks for any help
B2003