I'm trying to return an iterator for a vector in a templated class (I'm not sure if that makes a difference, but I've read that may, so I thought I'd mention it). The problem is that I get an error about C++ not supporting default-int when I try this. I've looked online and from what I can see in forums and explanaions, I don't think I'm that far off, it just won't compile.
template<class T>
class Table
{
public:
...
vector<shared_ptr<vector<T>>>::iterator GetRowIterator();
//vector<shared_ptr<vector<CellValueType> > >::const_iterator GetRowIterator();
...
protected:
vector<shared_ptr<vector<CellValueType> > > data; //outside vector is rows, inside vector is columns
...
};
vector<shared_ptr<vector<T> > >::const_iterator Table<T>::GetRowIterator()
{
return data.begin();
}
The errors that I get are:
error C2146: syntax error : missing ';' before identifier 'GetRowIterator'
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Edit:
Changed the end angle brackets so they are not as close together - same error.
Any thoughts as to why this is occurring?
As always, thanks for advice/help in advance!