So i'm making this class with a member function "insert" to copy from a string array to the classes contents which is a vector array.
This abort error keeps popping up saying i'm going past the Vector end, but i don't understand why....
Here's the code:
/////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////// Map class /////////////////////
class Map
{
private:
/////////////////////////////////////////// Map Variables ///////////////
string _name;
vector <string> _contents;
public:
Map(string name){_name = name;
_contents.reserve(56);};
~Map(){};
string getName()
{
return _name;
};
vector <string> getContents()
{
return _contents;
};
/////////////////////////////////////////// Insert ////////////////////////
// string* to an array of 56 strings;
bool Insert(string* _lines_)
{
for (int I = 0; I < 3; I++)
{
_contents[I] = _lines_[I];
}
return true;
};
};
If you need any more info just ask! Thanks!