Skip to content
Snippets Groups Projects
Select Git revision
  • 2023ss
  • 2025ss default
  • 2024ss
  • 2022ss
  • 2021ss
  • 2020ss
  • 2019ss
  • 2018ss
8 results

templates-04.cpp

Blame
  • templates-04.cpp 251 B
    #include <iostream>
    
    using std::cout;
    using std::endl;
    
    class bla
    {
      int content;
    };
    
    template <typename t>
    void print (t x)
    {
      cout << x << endl;
    }
    
    int main ()
    {
      print (42);
      print ("Hello, world!");
      bla blubb;
      print (blubb);
      return 0;
    }