Ask your own question, for FREE!
Computer Science 15 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!
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!