fork(1) download
  1. #include <memory>
  2.  
  3. template <typename T>
  4. class m_Mono_directional_node
  5. {
  6. public:
  7. m_Mono_directional_node(const T &_data,
  8. std::shared_ptr<m_Mono_directional_node<T>> _next = nullptr):
  9. data(_data),
  10. next(_next)
  11. {}
  12.  
  13. ~m_Mono_directional_node(){}
  14.  
  15. void set_data(const T &_newdata) { data = _newdata;}
  16. T get_data() {return data;}
  17.  
  18. void set_next(std::shared_ptr<m_Mono_directional_node<T>> _newnext) {next = _newnext;}
  19. std::shared_ptr<m_Mono_directional_node<T>> get_next() {return next;}
  20.  
  21.  
  22. protected:
  23. private:
  24. std::shared_ptr<m_Mono_directional_node<T>> next;
  25. T data;
  26.  
  27. };
  28.  
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