c++ - Undefined reference to Template Static Function -



c++ - Undefined reference to Template Static Function -

what wrong code !!!! undefined reference `bool bioqt::qsequencevalidator::isvaliddnasequence(bioqt::qsequence)'

class qsequencevalidator { public: template<class seq> static bool isvaliddnasequence(seq seq); } template<class seq> bool isvaliddnasequence(seq seq) { foreach (qchar c ,seq) { if(!compoundset::dnacompoundset().contains(c,qt::caseinsensitive)) homecoming false; } homecoming true; } int main(int argc, char *argv[]) { qcoreapplication a(argc, argv); qdebug()<<qsequencevalidator::isvaliddnasequence(pop); homecoming a.exec(); }

add qsequencevalidator:: before isvaliddnasequence definition. defining free function, not static fellow member function. i.e.

template<class seq> bool qsequencevalidator::isvaliddnasequence(seq seq) { ... }

c++ qt qt4

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -