Re: Untitled

By Colorant Baboon, 6 Years ago (2013-02-06 22:08:26), written in C++, viewed 369 times. This paste is a reply to Untitled by Scribby Lechwe
URL https://paste.godclan.hu/view/ESaUqIEz Embed
Download Paste or View RawExpand paste to full width of browser
  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