#include <stdlib.h>
long atol(const char *nptr);
#include <stdio.h>
#include <stdlib.h>
int main()
{
char *p1 = "123456";
char *p2 = "876544";
long c;
c = atol(p1) + atol(p2);
printf ("c = %d\n", c);
return 0;
}
./atol
c = 1000000
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |