```
int* grayCode(int n, int* returnSize) {
int i = 2, j = 0, start = 1;
if (n == 0) return returnSize;
int* res = (int *)malloc(*returnSize);
memset(res, 0, *returnSize);
res[0] = 0;
res[1] = 1;
while (i <= n) {
start = 2 * start;
j = 0;
while (j < start) {
res[start + j] = res[start - 1 - j] | (1 << (i - 1));
j++;
}
i++;
}
return res;
}
```

when i run my code , there is nothing show in the result box , but it's work fine on vs2015, looking for you help,thx!