Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template <class T>
- string Deposito<T>::geraChave(){
- char caracteresParaChave[] = "0123456789!@#$%^&*ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
- int tam_Chave;
- srand(time(NULL));
- tam_Chave = rand() % 40 + 10;
- string myChave;
- for (int i = 0; i < tam_Chave; i++)
- {
- int caracter = rand() % QTD_CHARS_PARA_CHAVE + 1;
- myChave = myChave + caracteresParaChave[caracter];
- }
- return myChave;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement