Hi, Just Want to Know What This Error Means

Nothing about your call to storeInitialValues matches the declaration. I think you might be confused thinking the names of the variables are important. That’s not the case. You have to pass variables that match the type of the variables in the function declaration in the correct order, the name are irrelevant.

int * & arr is a very strange declaration. int *arr would be a pointer to an int that you could treat as an array. What exactly are you aiming for with int * &? Mixing * and & requires that you be very careful with your usage. But you are also using vector, which is a very safe way of dealing with arrays. Why not just use vectors? You also declare and allocate ptr in the main function but you don’t use it nor do you delete it.

Leave a Comment