fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Node{
  5. int data;
  6. Node* pNext;
  7. };
  8.  
  9. void deleteLL(Node* &pHead) {
  10. while(pHead != nullptr) {
  11. Node* next = pHead->pNext;
  12. delete pHead;
  13. pHead = next;
  14. }
  15. }
  16.  
  17. int main() {}
Success #stdin #stdout 0.01s 5448KB
stdin
Standard input is empty
stdout
Standard output is empty