I have the following code: file.h:
#ifndef __ANA_H__
#define __ANA_H__
template <class T>
class ana {
class ana1{//code
}*anna1;
public:
bool method(T& data,ana::ana1 &a);
};
#endif
file.cpp:
#include <ana.h>
#include <iostream>
using namespace std;
template <class T>
bool ana<T>::method(T& data,ana::ana1 &t) {
cout << "Data = " << data << endl;
if(data > 0) {
return true;
}
return false;
}
I have error: ana::ana1 is not a type
. How to resolve this error? where am i wrong? need some help.thx
i am working in ubuntu and i compile the code using g++. i create an .a from the .h and .cpp i've posted.