Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. bool store_helper(int id, const string &data, const int data_size) {
  2.     check_settings();
  3.     string s = &data[0];
  4.     char* casted_string = new char[data_size];
  5.     strcpy(casted_string, &data[0]);
  6.     store(id, data_size);
  7.     write_data(id, casted_string, data_size);
  8.     delete[] casted_string;
  9.     return true;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement