Course Solutions Uncategorized (Solved) : Help Building Simple Vecotr Getting Error Try Store Values Thanks Const Int Size 10 Number Q27111103 . . . .

(Solved) : Help Building Simple Vecotr Getting Error Try Store Values Thanks Const Int Size 10 Number Q27111103 . . . .

 

Help with building a simple vecotr. I am getting an error when Itry to store the values. Thanks

const int SIZE = 10; // Number of elements

   int count; // Loop counter

// Create a SimpleVector of ints.

MyStaticArray intTable(SIZE);

// Create a SimpleVector of doubles.

MyStaticArraydoubleTable(SIZE);

// Store values in the two SimpleVectors.

for (count = 0; count < SIZE; count++)

{ intTable[count] = (count * 2); //Error: Use of overloadedoperator ‘[]’ is ambiguous (with operand types’MyStaticArray<int, 100>’ and ‘int’)

doubleTable[count] = (count * 2.14); //Error: Use of overloadedoperator ‘[]’ is ambiguous (with operand types’MyStaticArray<double, 100>’ and ‘int’)

}

How do I fix those two error.

intTable[count] = (count * 2;

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post