| | |
Convertings strings to numbers
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
>i tried the function atoi() and i think it only works for char and not for string.
Well there's your problem. You're guessing. "I think it only works for <yadda yadda yadda>".
It works perfectly for string types, assuming you know what a string type is and which one atoi accepts, except for the fact that atoi is horribly BROKEN! I mean, really. Do you people try to pick the worst possible option out of any list of choices I offer?
>i tried the function _toascii()-48...
... Yea, maybe you should post your code so that someone clueful can help you make it right.
Well there's your problem. You're guessing. "I think it only works for <yadda yadda yadda>".
>i tried the function _toascii()-48...
... Yea, maybe you should post your code so that someone clueful can help you make it right.
I'm here to prove you wrong.
![]() |
Similar Threads
- Tutorial: User Input: Strings and Numbers [C++] (C++)
- Tutorial: User Input: Strings and Numbers [C] (C)
- C++ Strings (C++)
Other Threads in the C++ Forum
- Previous Thread: Loop troubles
- Next Thread: (File Processing)help me with my assignment!!!
| Thread Tools | Search this Thread |
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph gui homeworkhelp iamthwee ifstream image input int java lib library list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






