Advertisement
Guest User

Untitled

a guest
Jun 26th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include "helper.h"
  2. #include <list>
  3. using namespace std;
  4. int main(int argc, const char * argv[]) {
  5.  
  6. //switch between list and vector
  7. list<int> a = {0, 1};
  8. list<char> b = {'a', 'b'};
  9.  
  10. func(a, b);
  11.  
  12. return 0;
  13. }
  14.  
  15. template <class C1, class C2>
  16. void func(C1 &a, C2 &b)
  17.  
  18. #include <list>
  19.  
  20. template <class C1, class C2>
  21. void func (C1 &a, C2 &b)
  22. {
  23. //do stuff
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement