Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygentest.cpp
Go to the documentation of this file.
00001 #include <iostream> 00002 #include <set> 00003 #include <vector> 00004 00005 template<class T> 00006 inline void printElements(const T& coll, const char* msg = "") 00007 { 00008 typename T::const_iterator it; 00009 std::cout << msg; 00010 for(it = coll.begin(); it != coll.end(); ++it) { 00011 std::cout << *it << ' '; 00012 } 00013 std::cout << std:: endl; 00014 } 00015 00016 int main(int /* argc */, char** /* argv */) 00017 { 00018 std::set<int> set1, set2; 00019 std::vector<int> aVector; 00020 00021 aVector.push_back(1); 00022 aVector.push_back(1); 00023 00024 set1.insert(aVector.begin(), aVector.end()); 00025 00026 set2.insert(1); 00027 set2.insert(1); 00028 00029 printElements(aVector, "vector: "); 00030 printElements(set1, "set1 : "); 00031 printElements(set2, "set2 : "); 00032 00033 return 0; 00034 } 00035 # if 0 00036 # include <iostream> 00037 main() 00038 { 00039 // std::stringstream tstr; 00040 std::cout<<"hello world\n"; 00041 } 00042 # endif Generated on Mon May 28 2012 04:35:01 for ReactOS by
1.7.6.1
|