Hello there! I am starting allegro and am getting familiarized with it... I am trying to device a structure that holds a dynamically sized (BITMAP*) array. However I get a compile error when I try to build it...
Code:#include <allegro.h> #include <cstdio> class Sprite { public: BITMAP **frames[]; Sprite(){} Sprite(BITMAP* addFrame, unsigned int size){ frames = new BITMAP*[size]; } }temp;
error is:
MINGW as compilerCode:||=== SpriteClass, Debug ===| C:\Projects\CodeBlocks\SpriteClass\main.cpp||In constructor `Sprite::Sprite(BITMAP*, unsigned int)':| C:\Projects\CodeBlocks\SpriteClass\main.cpp|10|error: incompatible types in assignment of `BITMAP**' to `BITMAP**[0u]'| ||=== Build finished: 1 errors, 0 warnings ===|
Any help?



LinkBack URL
About LinkBacks


