By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 898 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

How to convert a STD string object to an integer?

P: n/a
Hi,

If I have a std string object , how to convert a STD string object to
an integer?

Thank you.

Feb 20 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
si***************@gmail.com wrote:
If I have a std string object , how to convert a STD string object to
an integer?
Please see the FAQ and/or the news archives. Always do that before
posting, please.
Feb 20 '07 #2

P: n/a
On Feb 20, 3:37 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
silverburgh.me...@gmail.com wrote:
If I have a std string object , how to convert a STD string object to
an integer?

Please see the FAQ and/or the news archives. Always do that before
posting, please.
Thanks. I found this: http://www.cplusplus.com/reference/c...dlib/atoi.html
But it takes a char* c, not an STD string object.

Feb 20 '07 #3

P: n/a
si***************@gmail.com wrote:
On Feb 20, 3:37 pm, "Victor Bazarov" <v.Abaza...@comAcast.netwrote:
>silverburgh.me...@gmail.com wrote:
>>If I have a std string object , how to convert a STD string object to
an integer?
Please see the FAQ and/or the news archives. Always do that before
posting, please.

Thanks. I found this: http://www.cplusplus.com/reference/c...dlib/atoi.html
But it takes a char* c, not an STD string object.
As Victor told you, read the FAQ http://www.parashift.com/c++-faq-lite

In particular, FAQ 39.2
http://www.parashift.com/c++-faq-lit....html#faq-39.2

Feb 20 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.