Array Index: A simple question?

This is a discussion on Array Index: A simple question? within the C Programming forums, part of the General Programming Boards category; Originally Posted by mako wrong, for users it'll be 1 to n, not n-1 All you're doing is hiding what ...

  1. #16
    Registered User
    Join Date
    Jan 2006
    Posts
    5
    Quote Originally Posted by mako
    wrong, for users it'll be 1 to n, not n-1

    All you're doing is hiding what actually happens from the user to make it easier for them to understand...
    ...ya it's right 1 to n.
    The front end will be concentrated more in user point of view. If you are making users to understand all the aspects of coding logics it won't be a good idea.

  2. #17
    Logic Programmer logicwonder's Avatar
    Join Date
    Nov 2005
    Location
    Kerala, India
    Posts
    52

    Thumbs down Off the point.

    You are off the point.
    L GIK wins!!!
    Salutes from logicwonder
    Enjoy programming

  3. #18
    xhi
    xhi is offline
    !anExpert
    Join Date
    Mar 2005
    Location
    pa
    Posts
    155
    I think it is pretty well common practice to translate for the users of the software

    ex. printing a numbered list
    Code:
    for(int i=0; i<menu_size; ++i)
        cout << i+1 << ". " << menu_items[i] << endl;

    IMO. you would not print out a list to users starting with 0 regardless of who they are, advanced or beginners. It make a whole lot more sense to just change it from 0 to 1 when printing out..

    And as far as skipping the 0 index when you are programming.. well that makes no sense whatsoever..

  4. #19
    Logic Programmer logicwonder's Avatar
    Join Date
    Nov 2005
    Location
    Kerala, India
    Posts
    52
    Thank you everyone for ur contributions.
    L GIK wins!!!
    Salutes from logicwonder
    Enjoy programming

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. simple array of char array problem
    By cloudy in forum C++ Programming
    Replies: 5
    Last Post: 09-10-2006, 01:04 PM
  2. simple i/o question
    By n3v in forum C++ Programming
    Replies: 1
    Last Post: 04-06-2006, 09:13 AM
  3. Very simple question, problem in my Code.
    By Vber in forum C Programming
    Replies: 7
    Last Post: 11-16-2002, 03:57 PM
  4. simple array question
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 02-16-2002, 10:43 PM
  5. simple array question
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 12-03-2001, 04:46 PM

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