当前位置:网站首页>Qsrand, srand random number generating function in qt5.15 has been discarded
Qsrand, srand random number generating function in qt5.15 has been discarded
2022-06-28 22:29:00 【Trendy technology research society】
We often encounter problems such as generating random numbers , Used to be used in the past srand,qsrand Wait function is already in Qt5 The last version of Qt5.15 It's been abandoned in , here we are Qt6 Will not use it any more , In its place QRandomGenerator class .
int x = 0, y = 0;
srand(time(NULL));
x = rand()%N;
y = rand()%N;x = QRandomGenerator::global()->generate()%N;
y = QRandomGenerator::global()->generate()%N;
边栏推荐
- Zadig + sonarqube, ensuring the safety of the development process
- Windows mysql5.7 enable binlog log
- Interpretation of papers (DCN) towards k-means-friendly spaces: simultaneous deep learning and clustering
- 【Try to Hack】nmap
- go语言插件平台的实现思路
- How to use the apipost script - global variables
- How to use the style label of jade template- How to use the style tag with jade templates?
- Get to know Alibaba cloud (Cloud Computing) - development history, technical architecture, region and availability zone!
- 分享im即时通讯开发之WebSocket:概念、原理、易错常识
- What does project management really manage?
猜你喜欢

Zadig officially launched vs code plug-in, making local development more efficient

2022-06-28:以下golang代码输出什么?A:true;B:false;C:panic;D:编译失败。 package main import “fmt“ func main() {

场景化接口开发利器,金蝶云苍穹新版OpenAPI引擎来了!

宜明昂科在港交所递表:2021年亏损翻倍,过往融资额存在夸大情形

如何使用伦敦金画出支撑阻力线

Analysis of CSRF Cross Site Request Forgery vulnerability

Use of axurer9 master

硬件开发笔记(七): 硬件开发基本流程,制作一个USB转RS232的模块(六):创建0603封装并关联原理图元器件

Zadig 面向开发者的自测联调子环境技术方案详解

数据可视化中柱状图的实例应用,让乘风破浪公演结果一目了然
随机推荐
After crossing, she said that the multiverse really exists
华为云GaussDB(for Redis)揭秘第19期:六大秒级能力盘点
加刚干的前提
go语言插件平台的实现思路
彪马携手10KTF Shop启动其迄今为止规模首屈一指的Web3合作项目
Zadig 构建究竟何强大?一起来实践
数据库基础笔记
职场进阶 | 了解岗位优势三板斧之“进场”
场景化接口开发利器,金蝶云苍穹新版OpenAPI引擎来了!
杆会睡不着觉
什么是低代码开发?
在产业互联网时代,传统意义上的互联网将会演变出来诸多新的形态
How to use the apipost script - global variables
Detailed explanation of Zadig's self-test and joint debugging sub environment for developers
重磅!CDA认证考试备考答疑上线
Introduction to wrk pressure test tool
6年心得,从功能测试到测试开发,送给在测试路上一路走到黑的你
The new version of OpenAPI engine of Kingdee cloud dome is coming!
torch.nn.Transformer导入失败
【Try to Hack】nmap