I'm having a little trouble understanding how to do this properly. It seems like it's something simple that I have just glossed over.
Here are the struct definitions in my header...
Code:
struct source {
int num;
int *av[128];
char *tcpip[128];
int *tcpport[128];
char *label[256];
int *active[128];
char *sdip[128];
char *hdip[128];
char *aip[128];
}source;
struct display {
int num;
char *tcpip[128];
int *tcpport[128];
int *src[128];
}display;
Here is the line in which I'm trying to assign values where mon_selected is a simple int used to index a selected monitor.
Code:
drag_label(video_bg, source.label[display.src[mon_selected]], samp.x, samp.y, oldx, oldy);
...aaaand the error that I can't seem to get rid of without assigning display.src[mon_selected] to a temporary variable. ick.
Code:
src/touchscreen.c:57: error: array subscript is not an integer
It looks to me like I am not dereferencing the display.src member properly. My guess is that it is not following the pointer to the actual value. I'm not sure how to fix it though.
Enlighten me! Please and thank you.