I have the following class
File Node.c
std :: vector<NodeConnection*>* Node :: GetConnections() const
{
const std :: vector <NodeConnection*> * output = &this->connections;
return output;
}
file Node.h
class Node {
private:
std :: vector <NodeConnection*> connections;
public:
std :: vector <NodeConnection*>* GetConnections() const;
};
I am trying to convert the vector connections to a const pointer. However, I keep getting the error
[Error] invalid conversion from 'const std::vector<NodeConnection*>*' to 'std::vector<NodeConnection*>*' [-fpremissive]
How would I go about converting it to a constant pointer that I can return?