zlacker

[parent] [thread] 0 comments
1. treesp+(OP)[view] [source] 2021-11-04 18:09:12
I got access to Copilot technical preview earlier today, here's the completion you wanted to try:

    // Computes the index of them item.
    map_index(int item, int *array, int size)
    {
     int i;
     for (i = 0; i < size; i++)
     {
      if (array[i] == item)
      {
       return i;
      }
     }
     return -1;
    }
[go to top]