This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

main函数不同的定义方式,运行结果不同



分别是

方式一、void main( void){}

方式二、void main(int argc, char **argv)

这两个main函数生成的*.out文件,在开发板上的linux系统中,分别使用syslink进行加载运行,

只是一个LED的闪烁功能,使用的for进行的延时,

方式一,运行不对,闪烁频率与占空比不同

而方式二是正确的