Search:

Type: Posts; User: AndiPersti

Search: Search took 0.01 seconds.

  1. Replies
    21
    Views
    12,054

    A size of a pointer is always a constant value...

    A size of a pointer is always a constant value depending on your system. As you have been already told in another thread, you can't find out the size of an array if you just have a pointer to one...
  2. Replies
    21
    Views
    12,054

    So you want to find the start and the end of the...

    So you want to find the start and the end of the subarray. One solution would be to return a struct containing both pointers.

    How is the end point defined? Shouldn't this be another function?
    ...
  3. Replies
    21
    Views
    12,054

    You can't use the &-operator on the left side of...

    You can't use the &-operator on the left side of an assignment.

    I'm not sure what you want to achieve with this code.

    As I undestand it the first part of your problem was to find the pointer to...
  4. Replies
    21
    Views
    12,054

    You know the end (last element) of your array,...

    You know the end (last element) of your array, don't you?

    Thus


    array <= ptr <= &array[index_last_element]
    // or
    &array[0] <= &ptr[i] <= &array[index_last_element]

    should always be true,...
Results 1 to 4 of 4