I'm trying to create a system which receives a password to give you access to a certain file. now I'm having trouble at the start. is there any variable that I can use to combine both numbers and letters? for example something that will store the password "25j3d3". Thank you for your time.
1 Answer
You don't need to store the individual character types in separate variables (letters, numbers, punctuation) etc. separately. An std::string can hold all character types (it is even binary safe):
std::string password = "abc.,+123\xFF"; On a tangent, for storing and processing passwords, obfuscating your code may be a desired effect.
std::string,std::array,std::vector,std::tuple,std::pairyour own customstruct/class.. do you need more than that?std::string?