00001 #include <iostream> 00002 00003 00004 #ifndef PROGRESS_BAR 00005 #define PROGRESS_BAR 00006 00007 struct PBar 00008 { 00009 PBar(int i) : progress(i){} 00010 PBar(double i): progress(i*100.0){} 00011 00012 friend ostream& operator << (ostream& out, const PBar& pb ){ 00013 out << pb.progress << flush; 00014 return out; 00015 } 00016 00017 double progress; 00018 }; 00019 00020 #endif 00021