atoi的一个实现

leetcode 上有一道实现 atoi 题目。两年前我参加百度校招面试就被问到过这个题目。解决一个问题的方法很多,最简单的方法自然是用一个现成的方法解决之。譬如:c++ 简单版本:#include class Solution {public: int myAtoi(string s) { int v {0}; std::istrin

你可能感兴趣的:(c++,c,c,c++,算法)