Homework 6 & Midterm 1
Write a function int AtoiPlus(const char*, const char*) that takes two C-style strings containing int digit and return the corresponding int. For example, AtoiPlus("123", "4") return 127. You should write a main routine to test your function. Use at least the following code fragment to test your code.
1
string s = "1236";
2
char ca[] = "123";
3
// pass these into your AtoiPlus function and output 1359
2
3
Demo code :
1
}
See Also
(原創)如何将std::string转int,double? (C/C++)
(原創)如何将int,double转std::string? (C/C++)