1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#ifndef PROGRESS_THREAD #define PROGRESS_THREAD //function to display a progress bar void progressbar_thread(double* e){ unsigned int p = 0; while(p != 100){ std::cout.flush(); if(*e > p){ p = (unsigned int)(*e); rtsProgressBar(p); } } std::cout<<std::endl; //put a newline after the completed progress bar } #endif