Hello,
I do my first steps with the stl and so i star with the famous vector.
I created a class who contain a vector. The vector can be use by class's functions. I use virtual studio 2008.
example:
class Data
{ public: "constructors, destructor and operators..."
void test (char * data_tmp)
{ for ( int i = 0; i < data_tmp_max; i++ )
{
this->vdata.push_back( data_tmp[i] );
}
}
private:
int data_type, data_size_max, data_loaded, num;
std::vector<char> vdata;
}
i know i can use others functions for load a tab but it s test example and this doesn't function: Unhandled exception ... Microsoft C++ exception: std::bad_alloc at memory location 0x0053ed68..
I cann t give you all code, so heavy. But the program bug immediately in the first push.
The thing very strange, it s if i do a push in the constructor, this function Oo.