Click here to Skip to main content
16,005,734 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCPropertySheet Minimize button Pin
Coremn1-May-05 14:29
Coremn1-May-05 14:29 
GeneralRe: CPropertySheet Minimize button Pin
namaskaaram1-May-05 18:51
namaskaaram1-May-05 18:51 
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 
Anonymous wrote:
but i dont understand what the difference is between regular integers and the integers of any size

An 'integer of any size' is obviously a construct you will come up with, and it won't just be a type like 'int', because they have limitations. You're obviously going to store the digits that make up your number in the vector called 'digits', and so any operations you make will have to walk that vector and apply the addition/subtraction one digit at a time, just like you did it in primary school.

Anonymous wrote:
how do i distinguish between them when i am overloading the operators in the bignumber class?????

I don't see any operators that require you to use any numeric format apart from your own bignumber type, so this is not an issue.

Anonymous wrote:
even let me know what i would have to do differently for overloading these operators.

It seems to me that if you pass in the number 27 to your operator=, your vector will contain two values, 2 and 7. So operator= could turn the number into a string, then turn each digit into a number, to add to the vector. Then your iostream operators become very easy to write, and operator== is also really simple. Just walk the vectors. Operator+ and operator- will be a little more challenging, but you'd just walk the vectors, adding or subtracting numbers until there's nothing more to work with.


Christian Graus - Microsoft MVP - C++
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 
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 

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.