| | |
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++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib library linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output parameter pointer problem program programming project proxy python random read recursion recursive reference return string strings struct studio system template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






