fork download
  1. #include<stdio.h>
  2. #include<malloc.h>
  3.  
  4. struct node
  5. {
  6. int data;
  7. struct node* left;
  8. struct node* right;
  9. struct node* next;
  10. };
  11.  
  12. typedef struct node Node;
  13.  
  14. Node* Populate(Node* root)
  15. {
  16. if(root!=NULL)
  17. {
  18. root->Next = Populate(root->right);
  19. if(root->left!=NULL)
  20. {
  21. root->left->next = root;
  22. return Populate(root->left);
  23. }
  24. else
  25. {
  26. return root;
  27. }
  28. }
  29. else
  30. {
  31. return NULL;
  32. }
  33. }
  34.  
  35. int main(){
  36.  
  37.  
  38. return 1;
  39. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘Populate’:
prog.c:18: error: ‘Node’ has no member named ‘Next’
stdout
Standard output is empty