Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I cant figure out how to fix this error that i keep getting the pointer to object type i put the code a long with

I cant figure out how to fix this error that i keep getting the pointer to object type i put the code a long with the error i keep getting this is C++


  

   

1 TM st in 1000 2 3 4 5 6 Eclass Demo 7 8 9 10 11 224 12 13 14 15 16 17 18 19 20 21 222222 23 24 25 26 27 28 29 a m m m m m m 31 32 WN 33 #include #include #include #include 34 35 { private: //variable declare// 30 Evoid Demo::ADD() int Number1[255], Number2 [255], ADD[255]; char S1[255], $2[255]; int L1, L2; public: Demo () {}; void ADD(); //FUNCTION ADD// using std::cin; cin >> 51;//input the 2 numbers as string 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 LEF cin >> S2; //convert character to integer// for (L1 } for (L2 } = Number1[L1] = $1[L1] - 0 ; 0; S1[L1] != \0 ; L1++) = = 0; 52[L2] != \0 ; L2++) Number2 [L2] int carry = 0; int k 0; int i = L1 1; int j = L2 1; - = if (L1 > L2) 52 [L2] 0 ; for (; i >= 0 && j >= 0; i--, j--, k++) { ADD[k] (Number1[i] + Number2[j] + carry) % 10; carry = (Number1[i] + Number2[j] + carry) / 10; 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 } while (i > 0) { = ADD [k++] carry = else { (Number1[i] + carry) % 10; (Number1[i] + carry) / 10; else if (L1 < L2) { = while (j >= 0) { ADD [k++] = (Number2[j] + carry) % 10; carry (Number2[j--] + carry) / 10; = if (carry > 0) ADD [k++] = carry; } using std::cout; cout < < SUM OF THE TWO LARGE NUMBER = for (k--; k >= 0; k--) cout < < ADD[k]; 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 int main() { } using std::cout; using std::endl; cout < < endl; cout < < ENTER NUMBER TO CALCULATE ADDITION OF TWO LARGE NUMBERS. < < endl; Demo X; //CREATING INSTANCE // X.ADD();//CALLING ADD FUNCTION// system( PAUSE ); return 0;

Step by Step Solution

3.53 Rating (150 Votes )

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managerial Economics A Problem-Solving Approach

Authors: Luke M. Froeb, Brain T. Mccann

2nd Edition

B00BTM8FK0

More Books

Students also viewed these Accounting questions