回答編集履歴
1
追記
test
CHANGED
@@ -3,3 +3,33 @@
|
|
3
3
|
例えば、atoi()はどのような文字列を受け付けるか?・・・とか
|
4
4
|
|
5
5
|
[ライブラリー関数 IBM](https://www.ibm.com/support/knowledgecenter/ja/ssw_ibm_i_72/rtref/keyword.htm)
|
6
|
+
|
7
|
+
「ヒント」
|
8
|
+
|
9
|
+
```c
|
10
|
+
|
11
|
+
long stol(const char * str)
|
12
|
+
|
13
|
+
{
|
14
|
+
|
15
|
+
long ret= 0;
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
while(*str){
|
20
|
+
|
21
|
+
ret *= 10;
|
22
|
+
|
23
|
+
ret += *str - '0';
|
24
|
+
|
25
|
+
str++;
|
26
|
+
|
27
|
+
}
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
return ret;
|
32
|
+
|
33
|
+
}
|
34
|
+
|
35
|
+
```
|