- status: open --> closed
- Group: --> v1.0_(example)
bmp.cpp fails to compile...
g++ -c -o bmp.o bmp.cpp
bmp.cpp: In constructor 'sglib::bmp::bmpbuff::bmpbuff(sglib::DWORD, sglib::DWORD, sglib::WORD)':
bmp.cpp:316: error: array bound forbidden after parenthesized type-id
bmp.cpp:316: note: try removing the parentheses around the type-id
bmp.cpp: In member function 'sglib::bmp::bmpbuff& sglib::bmp::bmpbuff::copy(const sglib::bmp::bmpbuff&)':
bmp.cpp:406: error: array bound forbidden after parenthesized type-id
bmp.cpp:406: note: try removing the parentheses around the type-id
make: *** [bmp.o] Error 1
I think the construct you are using is illegal, and perhaps was accepted by older versions of gcc (I'm sure this used to compile for me when I first used the file in 2003).
I think the fix is to change lines 316 and 406
from
buffer = new (BYTE *)[height];
to
buffer = new BYTE *[height];