共用方式為


random_device Class

會從外部裝置的隨機序列。

class random_device {
public:
    typedef unsigned int result_type;
    explicit random_device(const std::string& token = /* implementation defined */);
    result_type min() const;
    result_type max() const;
    double entropy() const;
    result_type operator()();
private:
    random_device(const random_device&) = delete;
    void operator=(const random_device&) = delete;
    };

備註

類別會描述亂數的來源,最好在從非決定性的外部裝置。 在這個實作值產生的預設不屬於非決定性的。 它們在關閉的範圍 [0, 65535]統一散發。

需求

標題: <random>

命名空間: std

請參閱

參考

<random>

random_device::entropy

random_device::operator()

random_device::random_device