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.
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.
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.