Skip to content

Commit 60a44ba

Browse files
committed
fix atoi
1 parent 0cae1a2 commit 60a44ba

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

C++/chapString.tex

+3-3
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,9 @@ \subsubsection{代码}
214214

215215
while (str[i] == ' ' && i < n) i++;
216216

217-
if (str[i] == '+') i++;
218-
219-
if (str[i] == '-') {
217+
if (str[i] == '+') {
218+
i++;
219+
} else if (str[i] == '-') {
220220
sign = -1;
221221
i++;
222222
}

C++/leetcode-cpp.pdf

-27.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)