Skip to content

Commit 60d576a

Browse files
Create atoi.cpp
1 parent 261d716 commit 60d576a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

atoi.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Solution {
2+
public:
3+
int myAtoi(string str) {
4+
int r = 0;
5+
stringstream ss;
6+
ss << str;
7+
ss >> r;
8+
return r;
9+
}
10+
};

0 commit comments

Comments
 (0)