Allowance and Expenses entry Program

So, I'm making a program that will let the user input his/her allowance for 30 days after which, they will input their accumulated expenses for that month. The program will then subtract the allowance from the expenses and display it. I am to use two dimensional arrays, pointers, structures and void functions.
Here's what I currently have:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<iostream>
#include<iomanip>
#include<string>
#include<cmath>
using namespace std;
struct variables{int expenses;
    int allowance[1][30];
    int sum;
    int total;};
int main()
{
    int *a, *e, p1, p2;
    variables x = {0};
    cout << "Please enter your daily allowance for this month: " << endl;
    for(int week=0;week<1;week++)
            {
              cout << "Week " << week+1 << endl;
                   for (int day=0;day<30;day++)
                       {
                            cout << "Day " << day+1 << ": ";
                            cin >> x.allowance[week][day];
                       }
            }
    for(int week=0;week<1;week++)
            {
              cout << "Week " << week+1 << endl;
                   for (int day=0;day<30;day++)
                       {
                            cout << "       " << x.allowance[week][day];
                            x.sum+=x.allowance[week][day];
                       }cout << "       " << endl;
           }cout << "Total allowance is: " <<  x.sum;
             
    system("pause>0");
    return 0;
}


I'm currently stuck on how will I use pointers and a void function. I want to use pointers and a void function on the last part of my program(input of expenses and subtraction of allowance from expenses) but I have no idea how to do it. Can anyone give me some tips on how I can do that?
Topic archived. No new replies allowed.