hi evrybdy....
how can i generate a unique code against the user input in c++...
riu 0 Newbie Poster
Recommended Answers
Jump to Posta program in c++ which take some string from user and generate a unique code against it
Thats called hashing. You could do something like this :
string str = "abc"; unsigned long long hashCode = str[0]*1 + str[1]*2 + str[2]*3;
Basically, you are multiplying the value …
Jump to Post> Thats called hashing.
Hashing is not guaranteed to produce unique codes except in special circumstances. The answer to this question really depends on what the code is used for. The needs of the program determine how the code is generated. For example, if the code is unique for each …
All 7 Replies
Aranarth 126 Posting Whiz in Training
riu 0 Newbie Poster
Pacman21 0 Light Poster
mrnutty 761 Senior Poster
Radical Edward 301 Posting Pro
Pacman21 0 Light Poster
oz_engineer 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.