The struct way...by cantide5ga (no login)(credit to muratagenc of cplusplus.com forum)
struct myData { static char * Data; short int Read(){ if(*Data) { return *(Data++)- 48; } } } eData; char *myData: "1234567890" "2234567890" "3234567890" "4234567890" "5234567890" "6234567890" "7234567890" "8234567890" "9234567890" "0234567890"; int main(){ for(int i=0; i cout cout return 0; } Honestly, tuple seems like a strong possibility here. Will get back to ya on that to see what you think. |