You haven't really given us much information. You said:
i have written two normal codes i just do not know how to connect
so I assume you have freedom to modify both programs as you choose? If do, you have options:
1) Find some way for the two processes to communicate with each other. This is called inter-process communication. There are lots of different mechanisms to do this - a Google search will tell you about many of them - but the simplest for a beginner is to have one program write information to a file, and the other program read that information out of the file.
2) Refactor one, or both, of your programs so that one program can directly call code in the other. To do this, you'll need to re-organise the program(s) so that you create a library. This library should contain the code that implements the functionality you want both programs to have access to. Then, you link both programs against that library.
If you give us a clear, precise, complete description of your problem, we can maybe give some more specific help.