SHARE
TWEET

Untitled

a guest Jul 17th, 2017 32 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top