fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. template <class T>
  5. class ListManager
  6. {
  7. private:
  8. void* FirstItem;//This would point to the first item of the list
  9. void* LastItem;//This would point to the last item of the list
  10. public:
  11. void AddItemToList(const T& Item){
  12. std::cout << Item << std::endl;
  13. };
  14. void RemoveItemFromList(const T& Item){};
  15. };
  16.  
  17. int main() {
  18. ListManager<std::string> mgr;
  19. mgr.AddItemToList("Test");
  20. return 0;
  21. }
Success #stdin #stdout 0s 3228KB
stdin
Standard input is empty
stdout
Test