char to int - C++ Forum - cplusplus.com - The C++ Resources Network

char to int - C++ Forum - cplusplus.com - The C++ Resources Network

瀏覽:889
日期:2025-04-25
Gaminic (1602) Alternatively, for digits, you can use the ASCII codes. A char is actually just a number interpreted through the ASCII table. By looking at the table, you can find that '0' is 48, '1' 49 and so on until '9' as 57. As a result, you can do th...看更多