所以,我有一个std::list<std::string>,我问是否有一个功能或技巧随机化列表.
例:
first elem of the list : "Hello"
second elem of the list : "Stack"
third elem of the list : "Over"
fourth elem of the list : "Flow"
fifth elem of the list : "!!"
Run Code Online (Sandbox Code Playgroud)
我想要的是一个函数或技巧来获取这样的随机列表,例如:
first elem of the list : "Flow"
second elem of the list : "!!"
third elem of the list : "Hello"
fourth elem of the list : "Stack"
fifth elem of the list : "Over"
Run Code Online (Sandbox Code Playgroud)
我想你明白我的意思:)