This is probably a frowned-upon method of doing things.
Would it be considered "safe" to create an std::vector of sf::Image, to act as an array? I use it as a way to store dynamically-sized arrays of loaded images, but after reading the tutorial, it warns on Image-loading and the like, and I'd like to just ask for a general opinion. It hasn't caused any problems on my new box (3.4GHz x4, 4GB, Arch Linux/Win7) or my old box (1.2GHz x1, 512MB, Arch Linux/Win2k).
For example, the following code:
std::vector<sf::Image> array;
array.resize(2);
if (!array[0].LoadFromFile("image.png") || !array[1].LoadFromFile("image2.png"))
{
exit(EXIT_FAILURE);
}
(obviously, in this case, you'd just use sf::Image array[2], but as a concept)
I have no idea how std::vector or sf::Image work, so, I figured that I'd ask this.