" when it reach the next line of breakpoint - return result. "Program terminated with signal SIGSEGV, Segmentation fault. I need some help to show me where the problem is. I check the value of result at the line just before return result, it seems okay. *returnSize = resLen // set breakpoint hereĬhar ** outcome = letterCombinations(digits, returnSize) Result = (char *)malloc(strlen(tmp) + 1) Ĭhar *phoneData = phone - '0' - 2] įor (int i = 0 i < strlen(phoneData) i++) Ĭhar **result = (char **)malloc(sizeof(char *) * 40) ĬatRes(result, phone, digits, tmp, 0, &resLen) Void catRes(char **result, char **phone, char *digits, char *tmp, int nowIndex, Yet when I want to test on my local machine, I met a problem "Program terminated with signal SIGSEGV, Segmentation fault. I submit it online, and it passed the test.
0 Comments
Leave a Reply. |