Not in C, C++
but now C#.net introduce trick you can use 2 mains in one application. i implemented in my application too. I have scenario and requirement and implemented it successfully.
reference and proof is here https://www.youtube.com/watch?v=KJcBj3hLIpM