Thread: Just do..

  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,897
    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