【发布时间】:2010-07-30 09:49:07
【问题描述】:
我有以下代码,我尝试将 randomValue 插入 URL。
int randomValue = qrand() % 100;
view = new QWebView(this) ;
view->load(QUrl("http://blogsearch.google.com/blogsearch?q=C&start="+randomValue+"&num=1&output=rss"));
报如下错误:
错误:“const char*”和“const char [18]”类型的无效操作数转换为二进制“operator+”
所以,我想将randomValue 附加到 URL 中。我该怎么做?
【问题讨论】: