I have a public pointer object in a given class
srd::shared_ptr<std::vector<std::vector>> data
I could easily use in a function where I initialize it, but when I am trying to address it in the other fucntion of the same class, Xcode returns ‘Cannot refer to class template ‘data’ without a template argument list’
h:
class Whatever{
public:
void setup();
srd::shared_ptr<std::vector<std::vector<bool>>> data;
}
cpp:
#include "Whatever.h"
void Whatever::setup(){
data = ... //setting
for(int i = 0; i < data.get()->size(); i++){
works here
}
}
void Whatever::display(){
for(int i = 0; i < data.get()->size(); i++){ // data.get()->size() returns a given error
doesn't work here
}
}
Can anyone help me with that?