Thread: Static arrays and ellipsis

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Banned
    Join Date
    May 2009
    Posts
    37

    Static arrays and ellipsis

    well since C99, the concept of ellipsis has been introduced in variable arguments for macros and since has been extended to templates...

    what i've been wondering is why it has not been extended for declaring static arrays to address the array from the highest place to the lower....

    ex:

    Code:
    type array[10] = {undefined, undefined, undefined, undefined, undefined, undefined, 1, 2, 3, 4};
    to:
    Code:
    type array[10] = {..., 1, 2, 3, 4}

    OR:

    Code:
    type array[10] = {0, 0, undefined, undefined, undefined, undefined, 1, 2, 3, 4};
    to:
    Code:
    type array[10] = {0, 0, ..., 1, 2, 3, 4};

    i believe this comes handy when instead of typing "10" for the number of elements, you have it statically predefined somewhere else in the library...
    Last edited by renzokuken01; 12-29-2010 at 11:52 PM.

Popular pages Recent additions subscribe to a feed

Tags for this Thread