| | |
pointers and classes
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Jul 2009
Posts: 2
Reputation:
Solved Threads: 0
Hi:
How can I write a program using pointers and classes. My program suppose to translate dollar amounts in the range 0 through 9999 into an English description of the number. For example, the number 710 could be translated into the string seven hundred thirteen, and 8203 would be translated into eight thousand two hundred three, etc.
Any ideaa?
How can I write a program using pointers and classes. My program suppose to translate dollar amounts in the range 0 through 9999 into an English description of the number. For example, the number 710 could be translated into the string seven hundred thirteen, and 8203 would be translated into eight thousand two hundred three, etc.
Any ideaa?
Why would you need to use a pointer for this programming task?
I think a recursive function will do fine here.
It's only a small range you have to translate, so a recursive function will be the easiest in my opinion
Also: use arrays to store the numbers (in their expanded form, like: "one", "two", "three", ... , "ten", "twenty", "forty", etc. ...)
I think a recursive function will do fine here.
It's only a small range you have to translate, so a recursive function will be the easiest in my opinion

Also: use arrays to store the numbers (in their expanded form, like: "one", "two", "three", ... , "ten", "twenty", "forty", etc. ...)
Last edited by tux4life; Jul 14th, 2009 at 10:02 am.
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
![]() |
Similar Threads
- Implementing pointers using classes (C++)
- pointers and classes (C++)
- Help with pointers and classes (C++)
- pointers to windows forms (C)
- Please I need help formatting an output file and sorting the names! (C++)
- conversion type (C++)
Other Threads in the C++ Forum
- Previous Thread: Send data over network
- Next Thread: Help!My first C++ class is messed up!
| Thread Tools | Search this Thread |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code compile compiler console conversion convert count data delete deploy dll download dynamic dynamiccharacterarray encryption error file format forms fstream function functions game givemetehcodez google graph gui homeworkhelp iamthwee ifstream input int java lib library linker list loop looping loops map math matrix memory microsoft newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference rpg simple sorting string strings temperature template templates test text text-file tree url variable vector video visual visualstudio void win32 windows winsock wordfrequency wxwidgets






