且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

函数rand,rand和system的隐式声明

更新时间:2022-12-16 08:13:26

您未能完成#include <stdlib.h>.结果,假定您调用的函数接受未知数量的参数并返回类型为int的值.这会导致不确定的行为.

You failed to #include <stdlib.h>. As a result, the functions you called were assumed to accept an unknown number of arguments and return a value of type int. This causes undefined behavior.

#include <stdlib.h>放在文件顶部.