fork download
  1. #include <iostream>
  2. #include <queue>
  3.  
  4. using namespace std;
  5.  
  6. template <typename T, typename C=std::vector <T> >
  7. int fun()
  8. {
  9. cout <<" Inside fun () "<<endl;
  10. }
  11.  
  12. int main() {
  13. fun<int>(); // The second type argument is vector<int>
  14. fun<int,queue<long> >();
  15. return 0;
  16. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
 Inside fun () 
 Inside fun ()