Original Post
I'm wondering, are std::vectors acceptable as interface for a library or something similar? Because, in the case of the png decoder I made, you have to give as parameters: an std::vector containing the contents of the file, an empty std::vector& that will be filled with the pixels of the image, and an empty std::vector& that will be filled with information like the width and height of the image. So basically, when using this little library you have to make std::vectors and pass them to the function of the library. I don't think I've ever seen a library or API that used std::vectors, because most of them are for C too instead of only C++. My thing is only for C++ though, I find std::vectors much more conveniant, you don't have to think about memory allocation, they're standard C++, and don't decrease performance if you compile with optimization. So do you think it's annoying, or bad, to make it this way? Would it be better if you instead have to give normal C-style buffers, or those C++ things that will be allocated with "new[]" and "delete[]" as parameters?