fork download
  1. // --------------------------
  2. // Compare two vectors to see if they
  3. // are exactly identicle
  4. // Third parameter is blank just to get
  5. // the type for the template
  6.  
  7. template<class T, class U>
  8. bool equateVectors(const T& vector1, const T& vector2, U blankConstIterator)
  9. {
  10. U it1 = vector1.begin();
  11. U it2 = vector2.begin();
  12.  
  13. while(it1 != vector1.end() && it2 != vector2.end())
  14. {
  15. if( !( (*it1) == (*it2)) )
  16. return 0;
  17.  
  18. ++it1;
  19. ++it2;
  20. }
  21.  
  22. if(vector1.size() == vector2.size())
  23. return 1;
  24.  
  25. return 0;
  26. }
  27.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/gcc/i686-pc-linux-gnu/4.3.4/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
stdout
Standard output is empty