M
magnus.moraberg
Hi there,
Here is my code -
auto_ptr< H3D::MFInt32 > intList;
const vector<H3D::MFInt32 > intVector(10,0);
intList->setValue(intVector);
(where MFInt32 = MField< Int32 >)
Heres my error for the third line -
error: no matching function for call to ‘H3D::MFInt32::setValue(const
std::vector<H3D::MFInt32, std::allocator<H3D::MFInt32> >&)’
/usr/local/include/H3D/MField.h:547: note: candidates are: void
H3D::MField<Type>::setValue(const std::vector<PtrType,
std::allocator<_CharT> >&, int) [with Type = int]
/usr/local/include/H3D/MField.h:399: note: void
H3D::MField<Type>::setValue(typename H3D::MFieldBase<Type,
std::vector<PtrType, std::allocator<_CharT> >,
H3D:arsableMField>::size_type, const Type&, int) [with Type = int]
The two candidates are defined as follows -
inline virtual void setValue( typename BaseMField::size_type i, const
Type &v, int id = 0 );
template< class Type > void MField< Type >::setValue( const vector<
Type > &v, int id );
What am I doing wrong?
In the error message, why does it say -
error: no matching function for call to ‘H3D::MFInt32::setValue(const
std::vector<H3D::MFInt32, std::allocator<H3D::MFInt32> >&)’
even though I only have one argument?
Here's the documentation for the class -
http://www.h3dapi.org/uploads/api/H3DAPI_20/docs/H3DAPI/html/classH3D_1_1MFInt32-members.html
Hope you can help,
Barry
Here is my code -
auto_ptr< H3D::MFInt32 > intList;
const vector<H3D::MFInt32 > intVector(10,0);
intList->setValue(intVector);
(where MFInt32 = MField< Int32 >)
Heres my error for the third line -
error: no matching function for call to ‘H3D::MFInt32::setValue(const
std::vector<H3D::MFInt32, std::allocator<H3D::MFInt32> >&)’
/usr/local/include/H3D/MField.h:547: note: candidates are: void
H3D::MField<Type>::setValue(const std::vector<PtrType,
std::allocator<_CharT> >&, int) [with Type = int]
/usr/local/include/H3D/MField.h:399: note: void
H3D::MField<Type>::setValue(typename H3D::MFieldBase<Type,
std::vector<PtrType, std::allocator<_CharT> >,
H3D:arsableMField>::size_type, const Type&, int) [with Type = int]
The two candidates are defined as follows -
inline virtual void setValue( typename BaseMField::size_type i, const
Type &v, int id = 0 );
template< class Type > void MField< Type >::setValue( const vector<
Type > &v, int id );
What am I doing wrong?
In the error message, why does it say -
error: no matching function for call to ‘H3D::MFInt32::setValue(const
std::vector<H3D::MFInt32, std::allocator<H3D::MFInt32> >&)’
even though I only have one argument?
Here's the documentation for the class -
http://www.h3dapi.org/uploads/api/H3DAPI_20/docs/H3DAPI/html/classH3D_1_1MFInt32-members.html
Hope you can help,
Barry