Hi,

I wana to make keygen that not randomly codes, and with 2 text boxes,

Like i need to add "username" and "password" to gen for me

I need the code please help :)

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int cmp (const void * a, const void *b) { return rand() & 0x1; }

int main () {
    char alpha[] = "abcdefghijklmnopqrstuvwxyz";
    srand(time(0));
    qsort (alpha, 26, 1, cmp);
    return printf ("%s\n", alpha);
}

That will spit out a random string. Is that what you were looking for?

No no, he said

I wana to make keygen that not randomly codes

Here's one that's suitably not random :)

#include <string>
std::string generateKey (std::string username, std::string password)
{
  return (username + password);
}
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.