Multiple definition of main()

前端 未结 5 1731
刺人心
刺人心 2021-01-24 06:36

Hi guys trying to use two main() and getting this error multiple definition of main(). I renamed my main functions then why is this error and also first defined here for my prin

5条回答
  •  無奈伤痛
    2021-01-24 06:37

    I don't get what you ask - your error messages are quite clear:

    1. You have 2 definitions of print(), which will collide. Remove one.
    2. You as well have 2 definitions of main() - your #defines will replace your onemain and twomain functions, naming them effectively as main.

提交回复
热议问题