Advertisement
Guest User

Untitled

a guest
Jul 17th, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. struct node* inserting()
  2. {
  3.  
  4. float x;
  5. node* root = NULL;
  6.  
  7. ifstream inFile;
  8.  
  9. inFile.open("test.txt");
  10. if (!inFile) {
  11. cout << "Unable to open file";
  12. std::cin.get();
  13. exit(1); // terminate with error
  14.  
  15. }
  16.  
  17. while (!inFile.eof()) {
  18. inFile >> x;
  19. insert(root,x);
  20.  
  21. }
  22. return(node);
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement