Re: Untitled

From Colorant Baboon, 11 Years ago, written in C++, viewed 772 times. This paste will slip away in 1 Second. This paste is a reply to Untitled from Scribby Lechwe - view diff
URL https://paste.godclan.hu/view/ESaUqIEz Embed
Download Paste or View Raw
  1. /*
  2.  * thing.h
  3.  *
  4.  * Thing declaration.
  5.  */
  6.  
  7. #ifndef THING_H
  8. #define THING_H
  9.  
  10. template <typename T>
  11. T thing(T t);
  12.  
  13. #endif
  14.  
  15. /*
  16.  * thing.cpp
  17.  *
  18.  * Thing definition.
  19.  */
  20.  
  21. #include "thing.h"
  22.  
  23. template <typename T>
  24. T thing(T t)
  25. {
  26.     return t;
  27. }
  28.  
  29. /*
  30.  *
  31.  * main.cpp
  32.  *
  33.  */
  34.  
  35. #include "thing.h"
  36. #include <iostream>
  37.  
  38. int main()
  39. {
  40.     std::cout << thing(0);
  41.     return 0;
  42. }

Reply to "Re: Untitled"

Here you can reply to the paste above