```
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int busqueda_indexada(int a[], int n, int x) {
    int elementos[3]; int indice[3];
    int g; int i;
    int set=0; int ind=0;

    for (i=0; i<n-1; i+=3) {
        elementos[ind].nombre=a[i]);
        elementos[ind].indice = i;
        i+=3;
        ind++;
    }

    if (x<elementos[0].boleto) {
        return -1;
    } else {
        for (i=1; i<g-1; i++)
            if (x<elementos[i].elem) {
                int ini = elementos[i-1].indice;
                int fin = elementos[i].indice;
                set = 1;
                break;
            }
    }

    if (set==0) {
        int ini = elementos[G-1].indice;
        int fin = n-1;
    }   
}

struct elementos {
    int indice;
    char nombre[100];
    int boleto;
} elementos a[3];

int main(int argc, char *argv[]) {
    struct elementos a[3] = {"marco", 1, "sin asignar", 2, "pedro", 3};
    printf("%s y %d", a[2].nombre, a[2].boleto);
    busqueda_indexada(a, n, x)
    return 0;
}

```

I don't know how the indexed search can read my structure. I tried everything and always shows

> 
> [Error] request for member '' in something not a structure or union
> 
> 
> 

every time I tried to call a structure. Maybe I defined bad my struct or I call it in the wrong way?