This may be a long shot, but anyway... Say I have lots of arrays named list1[], list2[], list3[], etc. I want a while() loop or something similar where I do something like this:
....where X is incremented each time.Code:while(1) { afunction(listX); }
Is there a way to do this? I'm using GCC.
In case you wonder why I want to do this, I'm saving C arrays from Wireshark to feed into a C function for testing and the arrays it generates have incrementing numbers. I'm simply copy and pasting them, as-is, into my C file. The final target for the code is a small ARM processor, but I want to test my C function on a computer first so I don't care about code efficiency in this case.
Changing the syntax isn't really acceptable because I may have 100 of these arrays and it's very tedious to do this.