RollTime

main.cpp

Jan 23rd, 2021
1,215
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <filesystem>
  3. #include <cstdlib>
  4. #include <fstream>
  5. #include <vector>
  6. #include <algorithm>
  7. #include "FileVar.h"
  8.  
  9. using namespace std;
  10. namespace fs = filesystem;
  11.  
  12. int main(){
  13.     fs::path curr_path = fs::current_path();
  14.     fs::path ext_path = "test";
  15.     fs::path use_path = curr_path /= ext_path;
  16.    
  17.     cout << use_path << endl;
  18.        
  19.     FileVar fv1(3, use_path);
  20.     FileVar fv2("heyWorld", use_path);
  21.    
  22.     cout << fv1 << endl;
  23.     cout << fv2 << endl;
  24.    
  25.     cout << fv1.get_int() << endl;
  26.     cout << fv2.get_string() << endl;
  27.    
  28.     fv1.delete_var();
  29. //     fv2.delete_var();
  30.    
  31.     fs::path path_2 = fv2.get_path();
  32.    
  33.     cout << path_2 << endl;
  34.    
  35.     FileVar fv3(path_2);
  36.     cout << fv3 << endl;
  37.    
  38.     fv2.delete_var();
  39.    
  40.     return 0;
  41. }
  42.  
RAW Paste Data