Ask your own question, for FREE!
Computer Science 17 Online
OpenStudy (anonymous):

C++ programming question: I have a 2 dimensional vector of objects. I'm trying to assign m_pArray[x][y] = NULL; But I'm getting an error: "No operator '=' matches these operands. Can you help me figure out why?

OpenStudy (anonymous):

Well it tells you that the value NULL can't be assigned to this vector, I'm not sure but you can try : m_pArray[x][y] = 0; Good luck.

OpenStudy (anonymous):

What do you mean by 2-dimensional vector? What is the type of m_pArray?

OpenStudy (anonymous):

m_pArray is a vector, and two dimensional it's the X and Y, it's like he has to index to access a box for example, to assign the value 5 to in the place (1,2), you should do : m_pArray[1][2] = 5

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Jalissa21: What does adenoma mea?
37 minutes ago 2 Replies 0 Medals
Twilightt: How Can We Prevent Gun Violence in American Schools?
37 minutes ago 4 Replies 1 Medal
Twaylor: possible?
2 days ago 5 Replies 0 Medals
Arriyanalol: hekp
4 days ago 33 Replies 0 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!