Return value from void into array

Good day everyone. I need a help for my assignment

I have this code and the output it shows the d2, m2, and y2.
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
37
38
void addDays(int d1, int m1, int y1, int x)
{
int offset1 = offsetDays(d1, m1, y1);
int remDays = isLeap(y1) ? (366 - offset1) : (365 - offset1);
int y2, offset2;
if (x <= remDays)
{
	y2 = y1;
	offset2 = offset1 + x;
}

else
{
	x -= remDays;
	y2 = y1 + 1;
	int y2days = isLeap(y2) ? 366 : 365;
	while (x >= y2days)
	{
		x -= y2days;
		y2++;
		y2days = isLeap(y2) ? 366 : 365;
	}
	offset2 = x;
}

int m2, d2;
revoffsetDays(offset2, y2, &d2, &m2);

textBox29->Text += d2 + " - " + m2 + " - " + y2;
}

int main()
{
int d = 1, m = 1, y = 1970;
int x = day;

addDays(d, m, y, x);
}


And the problem is in here. I need the output to show up in "Date dt1"
1
2
3
4
5
6
7
8
time_t t = time(NULL);
		tm* tPtr = localtime(&t);
		Date dt1 = { d2, m2, y2 }; // old
		Date dt2 = { tPtr->tm_mday, (tPtr->tm_mon) + 1, (tPtr->tm_year) + 1900 }; // current

		int rem = getDifference(dt1, dt2);

		textBox30->Text += "Total difference : " + getDifference(dt1, dt2);


But is error and the solution is using array to get return value from void.

I dont know how to write, is there anyone know ? Thanks for the help.
http://www.cplusplus.com/doc/tutorial/arrays/ has "Arrays as parameters".
Basically, i confused what supposed to do. The solution that I mention above is from my teacher. Is somebody explain me ? I dont too much know about C++ but I get this assignment x_x
Topic archived. No new replies allowed.