| | |
Convert integer to string
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
:o Hi there!!!!!!
May I ask for help? After holidays all my C++ knowledge gone.
What I need is to create string from integer number and another string as
STRING = INTEGER + SUFFIX
where INTEGER is 5
SUFFIX is than 'th'
so STRING is 5th
May I ask for help? After holidays all my C++ knowledge gone.
What I need is to create string from integer number and another string as
STRING = INTEGER + SUFFIX
where INTEGER is 5
SUFFIX is than 'th'
so STRING is 5th
Last edited by peter_budo; Apr 10th, 2005 at 5:15 pm. Reason: spelling
First, convert the integer to a string, then concatenate the suffix.
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Then what are your strings? What code do you have that makes an attempt?
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
![]() |
Similar Threads
- Function to convert integer to single char. (C)
- convert int to string (C)
- How do I convert a vector to a String array ? (Java)
- Integer to string then 2 listbox (Visual Basic 4 / 5 / 6)
- how use integer values begins with zero (Java)
Other Threads in the C++ Forum
- Previous Thread: Singly Link List help
- Next Thread: Confused with algorithm
| Thread Tools | Search this Thread |
api array based binary c++ c/c++ calculator char char* class classes code coding compile console conversion count database delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int integer java lib linkedlist linker linux list loop looping loops map math matrix memory multiple news number numbertoword output parameter pointer problem program programming project python random read recursion recursive reference return rpg sorting string strings struct temperature template templates test text text-file tree unix url variable vector video visualstudio win32 windows winsock wordfrequency wxwidgets






