Pset6 Web-server... In Parse function, how do you store absolute-path at the address in abs_path?
bool parse(char* line, char* abs_path, char* query)
{
char* absolute-path;
// assume I've left out code that assigns text to absolute-path
abs_path = malloc(40);
strcpy(abs_path, absolute-path);
// assume everything else is implemented correctly
return true;
}
If I run debugger, in main, after this function is implemented, abs_path reverts back to what was passed into it. abs_path doesn't retain the value of absolute-path. How would I get it to store and retain the value of absolute-path?