請問一下..如果我想把字串轉成數字 int stoi(char str[]){ int x=strlen(str); int output=0; for(int i=0;i<=x;i++)output=output*10+str[i]-0x30; return output; } 這樣會計算到一次 '\0'-0x48 可是如果中間第五行<=改成了< 然而這會造成core dumped (linux) 不懂為甚麼@@