fork download
  1. #include <memory>
  2.  
  3. template <typename T>
  4. class m_Mono_directional_node
  5. {
  6. public:
  7. typedef std::shared_ptr<m_Mono_directional_node<T>> Ptr;
  8. m_Mono_directional_node(const T &_data,
  9. Ptr _next = nullptr):
  10. data(_data),
  11. next(_next)
  12. {}
  13.  
  14. ~m_Mono_directional_node(){}
  15.  
  16. void set_data(const T &_newdata) { data = _newdata;}
  17. T get_data() {return data;}
  18.  
  19. void set_next(Ptr _newnext) {next = _newnext;}
  20. Ptr get_next() {return next;}
  21.  
  22.  
  23. protected:
  24. private:
  25. Ptr next;
  26. T data;
  27.  
  28. };
  29.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
/usr/lib/gcc/i586-linux-gnu/5/../../../i386-linux-gnu/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: error: ld returned 1 exit status
stdout
Standard output is empty