-
September 23rd, 2010, 08:26 PM
#1
c++ array help
I need to output a seating chart for an airplane to look like this:
1AB CD
2AB CD
3AB CD
4AB CD
5AB CD
6AB CD
7AB CD
I keep getting an infinite loop when i try to number the rows.
void showplane()
{
int index = 1;
for (int n=0; n<7; n++)
{
for (int m=0; m<4; m++)
{
if(n = 1)
cout << index << plane[n][m] << " ";
else
cout << plane[n][m] << " ";
}
cout << endl;
}
}
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|