Visual Studio 2019 is not running other .cpp files

jroes

enter image description here

New to VS and C++. I'm trying to run code for source file "test2.cpp." However, every time I run the program, VS always runs "Simple-letter-with-ASCII-number.cpp."

I'm on the "test2.cpp" window, but the file never runs. I need assistance in running "test2.cpp" and not "Simple-letter-with-ASCII-number.cpp," without deleting any .cpp files, if possible.

  • Both .cpp files have different labeled main()
  • Both .cpp files are in the same project
blackdrumb

Your project will call main() when it runs. When you said “differently labeled main()” I am assuming you changed a main() to test2main(). Just change the main function you want to run to be main() and your program should run when you recompile.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

TOP Ranking

HotTag

Archive