You would have

oneres.q = headerarray[q];
oneres.c = headerarray[c];