Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
conversion
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
fanda00
New Member
Join Date:
Oct 2007
Posts:
2
#1
conversion
Oct 21 '07, 09:42 PM
hi can anyone help me out here. im trying to convert a string of numbers to int in c++, but have some difficulties.
can you show me how to do it.
regards Fanda
Ganon11
Recognized Expert
Specialist
Join Date:
Oct 2006
Posts:
3651
#2
Oct 21 '07, 09:45 PM
Check out the atoi() function.
Comment
Post
Cancel
fanda00
New Member
Join Date:
Oct 2007
Posts:
2
#3
Oct 21 '07, 09:58 PM
atoi() is for char[] and not for datatype string.
Comment
Post
Cancel
oler1s
Recognized Expert
Contributor
Join Date:
Aug 2007
Posts:
671
#4
Oct 21 '07, 10:37 PM
Originally posted by
fanda00
atoi() is for char[] and not for datatype string.
Ahh, could have told us that, no?
But really, look up stringstreams. While the C functions are always available, if you want to do conversions, use stringstreams in C++. If you're having trouble understanding the material you find on Google, feel free to continue asking here.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment