Advertisement
asqapro

Serialization Redone

Jul 29th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. struct bin{
  2.     void encrypt_vector(vector<string>& crypt){
  3.         stringstream ssv;
  4.         for(unsigned int i = 0; i < crypt.size(); ++i){
  5.             string word = crypt[i];
  6.             int mod_word[word.size()];
  7.             for(unsigned int x = 0; x < word.size(); ++x){
  8.                 stringstream ssl;
  9.                 string letter;
  10.                 char let = word[x];
  11.                 ssl << let;
  12.                 ssl >> letter;
  13.                 int num = encryption[letter];
  14.                 //modify_string = (modify_string * 10) + num;
  15.                 mod_word[x] = num;
  16.             }
  17.             copy(mod_word, mod_word+word.size(), ostream_iterator<int>(ssv));
  18.         }
  19.         ssv >> modify_string;
  20.     }
  21. }binary;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement