当将字符串作为布尔值使用时,将首先把字符串转换为整数,然后再计算真(非0)或假(0)。
When a string is used as a Boolean, it is first converted to an integer, and then evaluated for truth (non-zero) or falsehood (zero).
h 是 atoi() 函数(将 ASCII 码转换为整数)所需要的,该函数将字符串转换为整数。
stdlib.h is needed for the atoi() function (ASCII to integer), which converts a string to an integer.
在此示例中,第一个单元测试将数据库中的值转换为字符串,第二个单元测试将这些值转换为整数。
In this example, the first unit test converted the values from the database into strings and the second unit test converted them to integers.
应用推荐