fork download
  1. */
  2. void doubleTree(struct node* node) {
  3. struct node* oldLeft;
  4.  
  5. if (node==NULL) return;
  6.  
  7. // do the subtrees
  8. doubleTree(node->left);
  9. doubleTree(node->right);
  10.  
  11. // duplicate this node to its left
  12. oldLeft = node->left;
  13. node->left = newNode(node->data);
  14. node->left->left = oldLeft;
  15. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
gnatgcc -c -pipe -O2 prog.adb
prog.adb:1:01: compilation unit expected
prog.adb:2:36: illegal character, replaced by "("
prog.adb:5:11: == should be =
prog.adb:8:18: invalid token
prog.adb:9:18: invalid token
prog.adb:12:17: invalid token
prog.adb:13:07: invalid token
prog.adb:14:07: invalid token
prog.adb:15:01: illegal character, replaced by ")"
gnatmake: "prog.adb" compilation error
stdout
Standard output is empty