Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. QMap使用"[]"方式插入错误
Forum Updated to NodeBB v4.3 + New Features

QMap使用"[]"方式插入错误

Scheduled Pinned Locked Moved Unsolved Chinese
1 Posts 1 Posters 285 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    windOnTree
    wrote on last edited by
    #1

    Re: 欢迎大家来到Qt中文论坛
    有这样子一个问题,主要代码如下
    QMap<int,ProgressNode>taskList;//ProgressNode是我自定义的结构体
    ...
    taskList[zyId] = tmpProgressNode;//zyId和tmpProgressNode符合要求,但是这里出现错误。

    调用栈中,第一行光标会跳转到qmap.h的detach函数;
    第二行光标会跳转到qmap.h的Q_INLINE_TEMPLATE T &QMap<Key, T>::operator[](const Key &akey)这个函数里。
    请问这样子的错误,一般属于什么错误?
    麻烦各路大神帮帮忙,在此小弟谢过大家。

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved