Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ...
分类:
其他好文 时间:
2014-10-20 20:59:42
阅读次数:
275
一面1.算法题目atoi实现2. singleton 和 observer 设计模型observer 中的subscriber和unsubscribe 在多线程下的异常安全性问题(这个不是很清楚)3. 僵尸进程父进程未处理子进程的退出状态,导致占用系统资源(进程号)http://www.cnblog...
分类:
移动开发 时间:
2014-10-19 10:09:13
阅读次数:
230
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ...
分类:
其他好文 时间:
2014-10-19 06:53:03
阅读次数:
181
这是两道经常考到的笔试题,看似简单的实现,其实专注到细节,还是有很多需要注意扣分的地方。atoi实现: 1 #include 2 #include 3 using namespace std; 4 5 typedef enum status{ 6 OK,ERROR 7 }Status...
分类:
其他好文 时间:
2014-10-17 23:19:52
阅读次数:
281
#include#include#includeint main(void){ char a[1000]; scanf("%s",a); printf("%s->",a); for(;;) { int len=strlen(a); int i,j,old=atoi(a); for(i=0;ia[j....
分类:
其他好文 时间:
2014-10-16 09:09:32
阅读次数:
151
Problem:Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see be...
分类:
其他好文 时间:
2014-10-13 01:47:48
阅读次数:
187
Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ...
分类:
其他好文 时间:
2014-10-07 19:06:13
阅读次数:
193
1.CString 转 intCString strtemp = "100";int intResult;intResult= atoi(strtemp);-----------------------------------------------------------------2 int 转...
分类:
编程语言 时间:
2014-10-03 12:38:54
阅读次数:
235
在程序中,我们有时需要将一个十六进制字符串转换为十进制数字。比如:char *ptr="0x11";int n=0;//我们想让n等于0x11,即17通常我们在C中,想将一个字符串转换为一整形数字,通常会使用下面的方法:char*ptr="123";intn=0;n=atoi(ptr);printf...
分类:
其他好文 时间:
2014-09-26 19:03:08
阅读次数:
268
class Solution {public: int atoi(const char *str) { if (str == NULL) return 0; long val =0, pos = 0; char ch = '\0'; in...
分类:
其他好文 时间:
2014-09-20 01:08:46
阅读次数:
179