assigning my values to a two dimensional array

hello all,

I'm trying to write a very simple program that takes values in through variables, and stores those values in a two dimensional array. The values are already passed into the void function, I need to have those values write to their corresponding locations in the array.

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
39
40
41
void planeSeats(int seats[13][6], int ticket, int ticketRow, int ticketColumn)
{
	

	if (ticket = 1)
	{
		if (ticketRow >= 1 && ticketRow <= 2)
		{
			
		}
		else
		{

		}
	}

	if (ticket = 2)
	{
		if (ticketRow >= 3 && ticketRow <= 7)
		{

		}
		else
		{

		}
	}

	if (ticket = 3)
	{
		if (ticketRow >= 8 && ticketRow <= 13)
		{

		}
		else
		{

		}
	}

}


for example, lets say that ticketrow is 2 and ticket Column is 4 . What I need is for ticketRow and ticketColumn to assign that data to seat[ticketRow][ticketColumn], turning it into seat[2][4]. I just can't figure out how to do that.
exactly like you typed here seats[ticketRow][ticketColumn] = data;
yea, I realize what I was asking was stupid. but it was late when I asked that question. Literally 10 minutes later, I realized my mistake and fixed it.

What I was trying to do was assign that data to the array without trying to pass something into it. I'm good now though. thanks for the help.
Topic archived. No new replies allowed.