And probably with templates in general - I've never used them outside of Qt's
I am trying to pass boost::array< float, int > as a function argument, but GCC is comlaining :
Also, in the implementation .cpp file when I try an create a boost::array it complains :/home/lawrence/Projects/modelloader/src/modelloader.h:21: error: expected a constant of type ‘int’, got ‘unsigned int’
/home/lawrence/Projects/modelloader/src/modelloader.h:22: error: type/value mismatch at argument 2 in template parameter list for ‘template<class T, unsigned int N> class boost::array’
Also, I tried earlier to pass it as a pointer :/home/lawrence/Projects/modelloader/src/objloader.cc:81: error: ‘num_vertices’ cannot appear in a constant-expression
/home/lawrence/Projects/modelloader/src/objloader.cc:81: error: template argument 2 is invalid
Is that valid syntax?boost::array< float, int > *x
TIA.
Bookmarks