merging programs

hi !
I have two programs prog1 and prog2 , there are features in prog1 I want to use in prog2 , whats the best way of doing this ? if you look at the code the main function name is the same socket_cb()

thanks
note: I thought I could attach files here but I cant?
Last edited on
whats the best way of doing this ?
It depends on your needs. A good way would be to take the shared code and make a library [project] and then use it either in a shared (dll) or a static library.


You cannot attach files, but you can post your code with code tags: [code]Your code[/code]
Read this: http://www.cplusplus.com/articles/z13hAqkS/


Topic archived. No new replies allowed.