aspirinus

test

Jul 23rd, 2012
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1. #include "list.h"
  2. #include <list>
  3.  
  4. int main()
  5. {
  6.     int time;
  7.     const int n = 1e6;
  8.  
  9.     List<int> l1;
  10.     std::list<int> l2;
  11.  
  12.     time = GetTickCount();
  13.     for (int i = 0; i < n; ++i)
  14.         l1 << i;
  15.     printf("l1: %d\n", GetTickCount() - time);
  16.  
  17.     time = GetTickCount();
  18.     for (int i = 0; i < n; ++i)
  19.         l2 << i;
  20.     printf("l2: %d\n", GetTickCount() - time);
  21.  
  22.     return 0;
  23. }
  24.  
  25. /*
  26. Error E2090 .\main.cpp 10: Qualifier 'std' is not a class or namespace name in function main()
  27. Error E2379 .\main.cpp 10: Statement missing ; in function main()
  28. Error E2268 .\main.cpp 12: Call to undefined function 'GetTickCount' in function main()
  29. Error E2268 .\main.cpp 15: Call to undefined function 'printf' in function main()
  30. Error E2451 .\main.cpp 19: Undefined symbol 'l2' in function main()
  31. */
Advertisement
Add Comment
Please, Sign In to add comment