Click here to Skip to main content
16,006,013 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionfloating point data precision ? Pin
not_happy01-May-05 11:00
not_happy01-May-05 11:00 
AnswerRe: floating point data precision ? Pin
Christian Graus1-May-05 11:16
protectorChristian Graus1-May-05 11:16 
Generalinteger arithmetic Pin
eetelier1-May-05 9:30
eetelier1-May-05 9:30 
GeneralRe: integer arithmetic Pin
Christian Graus1-May-05 11:18
protectorChristian Graus1-May-05 11:18 
GeneralRe: integer arithmetic Pin
Anonymous1-May-05 11:36
Anonymous1-May-05 11:36 
GeneralRe: integer arithmetic Pin
Christian Graus1-May-05 11:46
protectorChristian Graus1-May-05 11:46 
GeneralRe: integer arithmetic Pin
Anonymous1-May-05 18:10
Anonymous1-May-05 18:10 
GeneralRe: integer arithmetic Pin
Christian Graus1-May-05 18:16
protectorChristian Graus1-May-05 18:16 
Anonymous wrote:
if i use the the class stack instead of vector can i just dispose of the function reverse()???

No.

Anonymous wrote:
i am not sure why i would want to use the function reverse()....

I assume so that you can create an iterator and go over the digits in reverse order for the sake of operators such as addition and subtraction. I thought you could create a reverse direction iterator though, although it's years since I used the STL. I imagine you'd call reverse before and after a mathematical operation. To me, that sounds more expensive than using array access instead of an iterator to move backwards through a container that's meant to be optimised for random access anyhow.

The problem with the code you've implimented is that it's not wrapped in a class. You should be doing all these operations within your class, using your own iostream inserters and extractors, instead of doing it all with a stack as you are here.

The general idea of what you're doing is a good start for your operator >>.


Christian Graus - Microsoft MVP - C++
GeneralRe: integer arithmetic Pin
Anonymous1-May-05 19:45
Anonymous1-May-05 19:45 
GeneralRe: integer arithmetic Pin
Christian Graus2-May-05 12:54
protectorChristian Graus2-May-05 12:54 
GeneralRe: integer arithmetic Pin
Anonymous1-May-05 18:11
Anonymous1-May-05 18:11 
GeneralRe: integer arithmetic Pin
ddmcr1-May-05 22:28
ddmcr1-May-05 22:28 
Generalsystem command Pin
picasso21-May-05 9:26
picasso21-May-05 9:26 
GeneralRe: system command Pin
mark novak1-May-05 9:31
mark novak1-May-05 9:31 
GeneralRe: system command Pin
ThatsAlok1-May-05 19:16
ThatsAlok1-May-05 19:16 
Generalproblem>> java server & vc++ client Pin
Member 17623431-May-05 9:14
Member 17623431-May-05 9:14 
Generalconvert inches,feet to centimetrs--and throw exceptions etc.... Pin
John K......1-May-05 8:50
John K......1-May-05 8:50 
GeneralRun executable from C++ Pin
Anonymous1-May-05 7:00
Anonymous1-May-05 7:00 
GeneralRe: Run executable from C++ Pin
Andrew Kirillov1-May-05 8:40
Andrew Kirillov1-May-05 8:40 
GeneralRe: Run executable from C++ Pin
picasso21-May-05 9:28
picasso21-May-05 9:28 
GeneralRe: Run executable from C++ Pin
ThatsAlok2-May-05 23:10
ThatsAlok2-May-05 23:10 
GeneralWindows media player Pin
azmina1-May-05 6:57
azmina1-May-05 6:57 
GeneralRe: Windows media player Pin
Christian Graus1-May-05 11:20
protectorChristian Graus1-May-05 11:20 
Questionget winhttp server using HINTERNET handle? Pin
ThinkingPrometheus1-May-05 5:08
ThinkingPrometheus1-May-05 5:08 
QuestionRichEdit for non MFC? Pin
DKT_1-May-05 1:05
DKT_1-May-05 1:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.