std::queue + Vector4 = x_x RRS feed

  • Question

  • Hi all,

    Trying to create a queue to store SkeletonFrame.SkeletonData[i].SkeletonPositions Vector4s, I come accross the following error:



    //In header of skeleton object, defined as
    queue<Vector4> skeletonPositions;
    //In cpp file


    Visual Studio indicates that SkeletonFrame.SkeletonData[i].SkeletonPositions is a Vector4, so I would think that this is possible? I imagine it's some kind of compilation of them, but I don't know how to specify how to put that in a queue. All I want is all of the data contained within that SkeletonPositions *thing*.

    This results in the following error:



    Error	1	error C2664: 'void std::queue<_Ty>::push(_Vector4 &&)' : cannot convert parameter 1 from 'Vector4 [20]' to '_Vector4 &&'	C:\Development\nui\src\KinectUI.cpp	293	1	nuilib

    I imagine this is a dumb thing that I've just overlooked, but a nudge in the right direction would be greatly appreciated. :)


    Monday, January 9, 2012 1:51 AM

All replies

  • I figured out how to do what I wanted another way, however I'm leaving this one up because I'd still like to know the answer.
    Monday, January 9, 2012 4:03 AM
  • It's telling you SkeletalPositions is an array of 20 Vector4's.  You're trying to push the whole array, instead of just one.
    Tuesday, January 10, 2012 7:24 PM