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