Two 'main' functions in C/C++

后端 未结 16 1425
一整个雨季
一整个雨季 2020-12-01 16:08

Can I write a program in C or in C++ with two main functions?

16条回答
  •  自闭症患者
    2020-12-01 16:43

    In some very special architecture, you can. This is the case of the Cell Processor where you have a main program for the main processor (64-bit PowerPC Processors Element called PPE) and one or many main program for the 8 different co-processor (32-bit Synergistic Processing Element called SPE).

提交回复
热议问题