Thread: Indexing 1

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    15

    Indexing 1

    What does "all indexing is based on 1"

    i know that C automatically does everything based on 0, how do i get it to 1?


    do i just go


    /code

    for(i=0; i<(s->len); i++)

    does this make some sense?

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    You want to start at 1 just make i = 1. But the reason you ussually see this is because
    1) Arrays start at 0 not at 1.
    2) That is a kinda of a standard for, for loops structure.
    Woop?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. indexing overload concept idea
    By Trauts in forum C++ Programming
    Replies: 6
    Last Post: 05-18-2003, 10:00 PM
  2. about inverted indexing program
    By Abdi in forum C++ Programming
    Replies: 1
    Last Post: 04-25-2003, 08:50 AM
  3. resources for network media indexing application
    By goose in forum Windows Programming
    Replies: 2
    Last Post: 10-14-2002, 02:04 AM
  4. Replies: 4
    Last Post: 10-11-2002, 06:58 AM
  5. Array Indexing w/ strlen()
    By c++_n00b in forum C++ Programming
    Replies: 8
    Last Post: 06-04-2002, 11:18 AM