CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: c++ array help

Hybrid View

  1. #1
    Join Date
    Sep 2010
    Posts
    1

    Exclamation 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;
    }
    }

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: c++ array help

    if(n = 1)

  3. #3
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,234

    Re: c++ array help

    [ Moved thread ]

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
  •  





Click Here to Expand Forum to Full Width

Featured