Question: solve the error is code please code must display : 5 5.5 this Displaying an object of type Vector in a different way: 5 5.5

solve the error is code please

solve the error is code please code must display : 5 5.5

code must display :

5 5.5 this

Displaying an object of type Vector in a different way:

5

5.5

this

CODE:

#include using namespace std; template class Vector { T* arr; int maximum; int index; public: Vector() { arr = new T[1]; maximum = 1; index = 0; } void add(T data) { if (index == maximum) { T* temp = new T[2 * maximum]; for (int i = 0; i v; Vector v1; Vector v2; v.add(5); v1.add(5.5); v2.add("this"); for (int i = 0; i

NOTE : PLEASE FIX IT THIS MY LAST Question in THIS SUBSCRIBETION.

Exception Thrown X Exception thrown at 0x79CDF3BE (ucrtbased.dll) in Project44.exe: Oxc0000005: Access violation reading location Ox00500000. Value 0 {arr=0x00845198 {5.50000000} maximum=1 index=1 } {arr=0x0084f73c "this" maximum=1 index=1 } Copy Details Start Live Share session... Exception Settings Break when this exception type is thrown Except when thrown from: ucrtbased.dll Open Exception Settings Edit Conditions

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!