QT方面的开发
源代码在线查看: stl-list.cc.svn-base
// Filename: STL-list.cc #include #include //list container #include //for accumulate using namespace std; void display(const list &lst) { list::const_iterator p; for (p = lst.begin(); p !=lst.end(); ++p) cout cout } int main() { double w[4] = { 0.9, 0.8, 88, -99.99 }; list z; // list container instantiated to hold double for( int i = 0; i < 4; ++i) z.push_front(w[i]); display(z); z.sort(); display(z); cout } /*out OOP> gpp STL-list.cc OOP> a.out -99.99 88 0.8 0.9 -99.99 0.8 0.9 88 sum is -10.29 OOP> */