>> how do i merge these two
1) Write a c++ program instead of C program.
or
2) Write a c++ stub program that has functions callable from C program and link the two object codes together.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.