摘要: string s; cin>>s; int num=atoi(s.c_str());//将字符串s转化成整数(以ASCII码的形式)。 c_str c_str是Borland封装的String类中的一个函数,它返回当前字符串的首字符地址。 atoi 函数原型:int atoi(const char 阅读全文
posted @ 2019-05-14 10:19 hermione1985 阅读(131) 评论(0) 推荐(0)