SHARE
TWEET

Untitled

a guest Jun 27th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. `void AddNewMagicItem(const std::string & ItemKey, const std::string &       ItemDescription, const std::string &filename)
  2. {
  3.     const char* ItemKeyName = ItemKey.c_str();
  4.     const char* ItemDescriptionBody = ItemDescription.c_str();
  5.     const char* FileToAddItemTo = filename.c_str();
  6.     std::ofstream AddingItem(FileToAddItemTo);
  7.     std::ifstream FileCheck(FileToAddItemTo);
  8.     AddingItem.open(FileToAddItemTo, std::ios::out | std::ios::app);
  9.     if (_access (FileToAddItemTo, 0) == 0)
  10.     {
  11.         if (FileCheck.is_open())
  12.         {
  13.             AddingItem << ItemKey;
  14.             std::cout << ItemKey << std::endl;
  15.         }
  16.     }
  17.     AddingItem.close(); // not sure these are necessary
  18.     FileCheck.close(); //not sure these are necessary
  19. }`
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top