List<MyClass*> & array question

Posted by Nano HE on Stack Overflow See other posts from Stack Overflow or by Nano HE
Published on 2010-05-17T06:01:28Z Indexed on 2010/05/17 6:10 UTC
Read the original article Hit count: 192

Filed under:
|
|
|

Hi, Assuming a definition like this,

list<MyCommand*> subList
...
MyCommand* pCmd = (MyCommand*)(m_treeSM.GetItemData(node));

I tried these statements below, but failed.

pCmd->subList[2]
(pCmd->subList)[2]

How can I get the array member values(such as subList[2]). I want to replace the value of subList[2] with other same type value. Thank you.

© Stack Overflow or respective owner

Related posts about c++

Related posts about arrays