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

Thread: c++ array help

  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
    Posts
    12,108

    Re: c++ array help

    if(n = 1)

  3. #3
    ovidiucucu's Avatar
    ovidiucucu is offline Moderator/Reviewer Power Poster
    Join Date
    Feb 2003
    Location
    Iasi - Romania
    Posts
    8,027

    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center