Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to convert char * into int
How to convert char * into int
How can char * not be converted into int? Int can be converted into char *.

1. First, enter int (12,2) in the python command window. The result was a mistake.

2. For 24589.

3. Change the number of the first parameter string in the int () method to 0 and 1.

4. If you want to convert a string into an octal number, please use the int () method and pass the second parameter 8.

5. Convert the string value to decimal, pass the second parameter to 2, and return the same result.

6. If you want to convert the value in the string into hexadecimal, and the value in the string cannot exceed a constant value.