Solution to String to Integer (atoi)

Be careful of the difference in string in C++ and Java