switch easily between different main()
Posted
by
lezebulon
on Stack Overflow
See other posts from Stack Overflow
or by lezebulon
Published on 2012-09-12T21:21:59Z
Indexed on
2012/09/12
21:38 UTC
Read the original article
Hit count: 164
c++
|visual-studio-2010
I'm using VS2010 I have a project with several headers and one file with the main() function. For testing purposes I'd like to be able to easily another main() function that would instanciate different things than my original main. Is there an easy way to define 2 "main" function, and easily switch between them? The best would be to compile 2 binaries, one that starts at main1() and the other at main2(), or it can be a solution that requires to recompile some files, it doesn't matter
© Stack Overflow or respective owner