SHARE
TWEET

Untitled

a guest Jul 17th, 2017 35 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. int get_first()
  2. {
  3. float x;
  4.  
  5.     node* first = NewNode();
  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.     inFile >> x;
  17.    
  18.    
  19.     return(x);
  20. }
  21.  
  22.    
  23.  
  24. int main()
  25. {
  26.     int n;
  27.    
  28.     get_first() = n;
  29.     node* point = insert();
  30.  
  31.     inserting();
  32.  
  33.     printTree(point);
  34.  
  35.     std::cin.get();
  36.  
  37.     return 0;
  38.  
  39. }
RAW Paste Data
Top