Where is the main function?

I agree with Saswat - how can this be your code? You cannot possibly have written code like that if you haven't got a clue how to "merge" it or even to explain what you mean by that.

Out of interest I tried Googling "hamming jiaoyan" and it seems you've been busy posting this on lots of different forums with exactly the same response at each: what are you talking about, and in each case you failed to clarify.