The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
vector of opaque SDL struct types
jsalina


Joined: 04 Jun 2014
Posts: 17
SDL gives you access to opaque structure types like SDL_Texture, TTF_Font, etc., but why does an array of pointers of these types work, but a vector of pointers kicks back "expected constructor, destructor, or type conversion before 'variable'"?


TTF_Font *fonts[10]; // works fine.


vector(TTF_Font*) fonts; // generates error.


The size of TTF_Font is unknown in both scenarios, but since it's just pointers shouldn't it work for both? Is there no way to dynamically create opaque SDL struct types?
jsalina


Joined: 04 Jun 2014
Posts: 17
Nevermind I'm an idiot < > instead of ( )