Answer the question
In order to leave comments, you need to log in
Can't instantiate a class and access its methods?
in header.h
#ifndef _HEADER_H
#define _HEADER_H
template<typename T>
class mytype
{
public:
mytype(void)
{
myvar = 0;
};
mytype(const T& var)
{
myvar = var;
}
mytype(const mytype& var)
{
this->myvar = var->myvar;
};
mytype operator=(const mytype& var)
{
this->mytype(var);
};
const T operator*(const mytype& var);
const T operator/(const mytype& var);
const T operator+(const mytype& var);
const T operator%(const mytype& var);
private:
T myvar;
};
#endif
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question