I have a problem at hand that I have a few questions about and possibly could use some advice. The problem states:

Write a program that defines an array of two vector records, where each record consists of two double precision components a and b. The program should permit the user to enter two vectors, call two funtions that return the sum and difference of the entered vectors, and display the results calculated by these functions.

What is an example of an array of two vector records? I have to use structures to write this program.

after the user enters the components how do you pass a structure to a function? If you even would have to.

finally is there an example of a program like this that someone might know about I could glance at to get a few pointers?

here is my code in progress(which doesnt compile)

Code:
#include<iostream>
using namespace std;
struct Vector
{
   double a;
   double b;
};
double sum(Vector a,Vector b);

int main()
{
    double a1,a2,b1,b2;
    
    Vector a={a1,a2};
    Vector b={b1,b2};
    double sum1;
    
    cout<<"Please enter the components of the first vector"<<endl;
    cin>>a1;
    cin>>a2;
    cout<<"Please enter the components of the second vector"<<endl;
    cin>>b1;
    cin>>b2;
    
    sum(Vector a,Vector b);
    cout<<sum1<<endl;
    
    system("pause");
    return 0;
}
double sum(Vector a,Vector b)
{
       double sum1;
       sum1 = a + b
       return(sum1);
}