C ++编程语言 [英] c++ programming language

查看:96
本文介绍了C ++编程语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我正在设计用于ISBN号检查的C ++代码,任何人都可以帮助我如何逐字符检查输入的字符串.

Hello all,
I am looking to design c++ code for ISBN number check any one can help me how i can check entered string character by character.

推荐答案

使用strtok(),或类似的方法将字符串分解为各个部分,然后在每个部分上使用atoi()将字符串转换为整数.如果您使用的是STL,则strstream可能会更简单.
Use strtok(), or similar to break the string into its components, and then atoi() on each part to convert the string into an integer. If you are using STL then strstream may be simpler.


这篇关于C ++编程语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆