Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

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

    Chinese
    1
    1
    148
    Loading More Posts
    • 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
      windOnTree last edited by

      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 Reply Quote 0
      • First post
        Last post