fork download
  1. #include <iostream>
  2.  
  3. template <typename T>
  4. class sgink
  5. {
  6. public:
  7. void pri();
  8.  
  9. private:
  10. struct node
  11. {
  12. T data;
  13. node* next{nullptr};
  14. };
  15.  
  16. node head;
  17. };
  18.  
  19. template <typename T>
  20. void sgink<T>::pri()
  21. {
  22. std::cout << head.data << std::endl;
  23. }
  24.  
  25. int main()
  26. {
  27. sgink<int> a;
  28. a.pri();
  29. return 0;
  30. }
Success #stdin #stdout 0s 3456KB
stdin
Standard input is empty
stdout
0