stdcpp/tsrc/Stdcpp_test/stlport/auto/stlport_tstdeq/src/tstdeq.cpp
changeset 0 e4d67989cc36
child 18 47c74d1534e1
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1  
       
     2 #include <algorithm>
       
     3 #include <cstring> 
       
     4 #include <string>
       
     5 #include <deque>
       
     6 #include <iterator>
       
     7 #include <iostream>
       
     8 #include <functional>
       
     9 
       
    10 typedef std::string Str;
       
    11 typedef std::deque<Str> Dq;
       
    12 #if !defined (STLPORT) || defined(__STL_USE_NAMESPACES)
       
    13 using namespace std;
       
    14 #endif
       
    15 int insert1_test(int, char**)
       
    16 {
       
    17   Str array1 [] = { "laurie", "jennifer", "leisa" };
       
    18   Dq nam(array1, array1 + 3);
       
    19   Dq::iterator i = nam.begin() + 2;
       
    20   Str a;
       
    21   
       
    22    a=*i;
       
    23    cout<<*i;
       
    24    
       
    25   if(a.compare("leisa")!=0)  
       
    26    return 1;
       
    27   else   
       
    28   return 0;
       
    29 }