Click here to Skip to main content
12,501,833 members (51,783 online)

Managed C++/CLI

QuestionLarge integer class please help Pin
Msemler9328-Sep-12 1:29
memberMsemler9328-Sep-12 1:29 
AnswerRe: Large integer class please help Pin
Richard MacCutchan28-Sep-12 2:05
mvpRichard MacCutchan28-Sep-12 2:05 
AnswerRe: Large integer class please help Pin
jschell28-Sep-12 10:22
memberjschell28-Sep-12 10:22 
You don't need the null at the end

Your constructor looks ok except that you did not take into account that the first byte might be a sign character.

I am not sure why your teacher thinks it would be better to store it backwards.

I suggest you try to create the following method next.

bool operator==(const BigInteger & arr) const;

To code it THINK (don't code) about the following cases
- The number is exactly the same.
- One number is zero, the other isn't.
- One number have more digits than the other.
- AFTER you do the above then consider what happens if the 'sign' value is set to represent a negative value.

AFTER you think about the above then attempt to code the method.
GeneralRe: Large integer class please help Pin
Msemler9329-Sep-12 9:52
memberMsemler9329-Sep-12 9:52 
GeneralRe: Large integer class please help Pin
jschell30-Sep-12 8:12
memberjschell30-Sep-12 8:12 

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.

Advertise | Privacy | Mobile
Web02 | 2.8.160919.1 | Last Updated 24 Sep 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid