error C2039:'rand' :is not a member of 'std'
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/18 05:49:40
![error C2039:'rand' :is not a member of 'std'](/uploads/image/z/9719048-56-8.jpg?t=error+C2039%3A%27rand%27+%3Ais+not+a+member+of+%27std%27)
x)K-*/Rp620R/JKQW,V/QHTMMJ-ROSP/.IQI*'M~
v|+wɎ:/zXuӍ
g聍yE/|k/hy9ejt.kz6oΓ E;;K~tr1řy
@@V@-.r~qAb($
error C2039:'rand' :is not a member of 'std'
error C2039:'rand' :is not a member of 'std'
error C2039:'rand' :is not a member of 'std'
rand和srand及time没有加入名称空间std中,而是全局的.
下面这些代码是错误的,如果你是这么写的,去掉吧.
using std::rand;
using std::srand;
using std::time;