https://leetcode-cn.com/problems/string-to-integer-atoi/
LeetCode第八题
1 class Solution { 2 public: 3 int myAtoi(string str) { 4 int d=0; 5 istringstream is(str); 6 is >> d; 7 return d; 8 } 9 };
记录这个题主要是通过这个题主要是了解一下C++一些stringstream,重点不在算法
https://leetcode-cn.com/problems/string-to-integer-atoi/
LeetCode第八题
1 class Solution { 2 public: 3 int myAtoi(string str) { 4 int d=0; 5 istringstream is(str); 6 is >> d; 7 return d; 8 } 9 };
记录这个题主要是通过这个题主要是了解一下C++一些stringstream,重点不在算法
来源:https://www.cnblogs.com/MasterYan576356467/p/11435696.html