You are mixing specialization and general template.
For specializazoin you need the following syntax:
template<>
MyLibrary::MyLibrary<quint32>(qint32 qiX, qint32 qiY, qint32 qiZ)
{...
}
template<>
MyLibrary::MyLibrary<quint32>(qint32 qiX, qint32 qiY, qint32 qiZ)
{...
}
To copy to clipboard, switch view to plain text mode
Or a general template:
template<class T>
MyLibrary::MyLibrary(T qiX, T qiY, T qiZ)
{...
}
template<class T>
MyLibrary::MyLibrary(T qiX, T qiY, T qiZ)
{...
}
To copy to clipboard, switch view to plain text mode
Ah and:
This is the implementation in my .cpp file
templates are implemented in headers, not in *.cpp files.
Or more correctly said:
The implementation (definition) of a template class or function must be in the same file as its declaration, and this is usually done in a header.
Read more abut how to create and use templates in c++.
Bookmarks