acticn

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: 作业7发布公告 #9949 Score: 3
    acticn
    Participant
    3 pts

    global.hpp下的get_random_float()随机数生成函数存在问题。
    会导致在重复调用该函数时,返回同一个值。

    我的解决方案是把其中定义的dev,rng,dist在main.cpp中定义为全局变量。
    修改后的main.cpp和global.hpp在附件中。

    This post has received 3 votes up.
    Attachments:
    You must be logged in to view attached files.
Viewing 1 post (of 1 total)