操纵用户输入 [英] Manipulating user input

查看:65
本文介绍了操纵用户输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我对c ++很新。我需要美元形式的用户输入

金额,即:$ 10.00。我想删除美元符号$。然后

将其余的存储在一个变量中。我如何去除美元

标志?提前致谢!

Hi,

I''m fairly new to c++. I need user input in the form of dollar
amounts, ie: "$10.00". I''d like to remove the dollar sign "$" then
store the rest in a variable. How do I go about removing the dollar
sign? Thanks in advance!

推荐答案

10.00"。我想删除美元符号
10.00". I''d like to remove the dollar sign "


"然后

将其余的存储在一个变量中。我如何去除美元

标志?提前致谢!
" then
store the rest in a variable. How do I go about removing the dollar
sign? Thanks in advance!




" agent349" < AG ****** @ yahoo.com>在留言中写道

新闻:e2 ************************** @ posting.google.c om ...

"agent349" <ag******@yahoo.com> wrote in message
news:e2**************************@posting.google.c om...


我对c ++很新。我需要以美元金额的形式输入用户,即:
Hi,

I''m fairly new to c++. I need user input in the form of dollar
amounts, ie: "


这篇关于操纵用户输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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