问题描述
- C语言中 srand((unsigned)time(NULL)) error:表达式必须具有(pointer-to-)函数类型
-
C语言中 srand((unsigned)time(NULL)) error:表达式必须具有(pointer-to-)函数类型
解决方案
srand((unsigned int)time(NULL));
time(NULL)的返回值是 time_t
时间: 2024-08-03 16:30:17
srand((unsigned int)time(NULL));
time(NULL)的返回值是 time_t