i need to extract three GzVertex and GzColor from thier respective queues and send them to the function frawTriangle. I tried the following code but it was giving me the following error
Error 2 error C2664: 'GzFrameBuffer::drawTriangle' : cannot convert parameter 1 from 'std::vector<_Ty>' to 'std::vector<_Ty> &' for the last line, when i try to pass the vector to the function drawTraingle. plss help i am a beginner to c++
1. The type of vvs is std::vector<std::vector<GzVertex> >. GzFrameBuffer::drawTriangle() expects an std::vector<GzVertex> as its first parameter.
2. Deriving from STL containers is unsafe.
Error 2 error C2664: 'GzFrameBuffer::drawTriangle' : cannot convert parameter 1 from 'std::vector<_Ty> [3]' to 'std::vector<_Ty> &' c
I think the error message is quite clear. You define drawTriangle first parameter to be std::vector<_Ty> & which say reference to ONE vector<_Ty> but when you call it you are passing an array containing 3 vector<_Ty> so of course it don't match.
You need to know what you want out of drawTriangle.