fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3.  
  4. //Define the template of a class.
  5. template<class T>
  6. class Type
  7. {
  8. public:
  9. typedef std::vector<T> Vec;
  10. };
  11.  
  12. //Typedef the entire thing so it is easier.
  13. typedef Type<int>::Vec IntVec;
  14.  
  15. int main()
  16. {
  17. //Finally, use the type.
  18. IntVec SomeIntVector;
  19. std::cout << "End.";
  20. }
  21.  
Success #stdin #stdout 0.02s 2724KB
stdin
Standard input is empty
stdout
End.