Just do..

This is a discussion on Just do.. within the C++ Programming forums, part of the General Programming Boards category; Since you already have the array length, 100, just do: char array[100]; for(int a = 0; a < 101; a++) ...

  1. #1
    BubbleMan
    Guest

    Post Just do..

    Since you already have the array length, 100, just do:

    char array[100];

    for(int a = 0; a < 101; a++)
    {
    }

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    That's okay in a small program, but when you have a 10000 line behemoth then changing every occurence of 101 to something different if the size of the array needs to be changed is nothing short of hell.

    And you hit the new thread button, not the reply button

    -Prelude

  3. #3
    BubbleMan
    Guest

    Post Oops

    Sorry about that..I just go quickly..not paying attention..

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21