Say I have:
class errorManager{
private:
vector<string> n1;
vector<string>n2;
std::string name;
public:
errorManager() { name = test.txt; }
void addtext(std::string first,std::string second){
ofstream file;
file.open (name, ios::out | ios::app);
file << error << endl;
file << endl;
file << error_desc;
file << endl;
n1.push_back(first);
n2.push_back(second);
file.close();
}
};
and I have another class that just has a member of one of the above types.That class contains a function,that simply calls addtext("t","t")
Both classes are placed in a dll and have ALL their functions __declspec(dllexport)
STILL if I create a project,include only the errorManager dll,create an object of that type and call addtext("t","t") i get NO error!
This is where the error redirects me:
if (_Inside(_Ptr))
return (assign(*this, _Ptr - _Myptr(), _Count)); // substring
if (_Grow(_Count))
{ // make room and assign new stuff
_Traits::copy(_Myptr(), _Ptr, _Count);
_Eos(_Count);
}
return (*this);
}
The error: Microsoft Visual Studio C Runtime Library has detected a fatal error ...