hello every one ;
for the past two days I was working on a very simple project
that allow me to draw and modify rectangle shapes
the program save the vector of rectangle shape very easily but when it comes to loading them
then odd exceptions thrown when drawing them
so what is the problem here
std::ifstream reader(file_name.c_str(),std::ios::binary|std::ios::ate);
unsigned int bytes=reader.tellg();
reader.close();
reader.open(file_name.c_str(),std::ios::binary);
for(unsigned int ds=0;ds<(bytes/sizeof(sf::RectangleShape));ds++)
rectangles.push_back(sf::RectangleShape(sf::Vector2f(1,1)));
reader.read((reinterpret_cast<char*> (&rectangles[0])),bytes);
reader.close();