Hello, I've some problem with using templates:
myclass.h
#ifndef MYCLASS_H
#define MYCLASS_H
class myclass
{
private:
public:
~myclass();
myclass();
template<class S>
void login(S login, S pass);
};
#endif // MYCLASS_H
myclass.cpp
#include "myclass.h"
#include "../additional_func.h" // for connect(QString,QString) function
myclass::myclass()
{
}
template <typename S>
void myclass::login(S login, S pass)
{
additional_func->connect(login,pass);
}
myclass::~myclass()
{
}
in mainwindow.cpp (i'm using QT)
myclass *vr = new vr();
vr->login(ui->linelogin->text(),ui->linepwd->text()); // QString, QString
And I get error:
mainwindow.cpp:31: error: undefined reference to `void ecore::connect(QString, QString)'
What way for using myclass::connect in other classes?