Feb 9, 2006 #1 iceice Programmer Feb 9, 2006 6 GB Is it possible to create an array of HBITMAP and then cycle through the array I've tried HBITMAP *bitmaps won't work Thanks
Is it possible to create an array of HBITMAP and then cycle through the array I've tried HBITMAP *bitmaps won't work Thanks
Feb 9, 2006 #2 Salem Programmer Apr 29, 2003 2,455 GB Did you try HBITMAP bitmaps[10]; -- Upvote 0 Downvote
Feb 9, 2006 Thread starter #3 iceice Programmer Feb 9, 2006 6 GB Thanks. It has caused an error elsewhere in the program I have a constructor which begins as follows TWin(HWND _hwnd,int _id) : hwnd(_hwnd),id(_id), bBack(0),bSpr(0),hClip(0),bitmaps(0) { bitmaps(0) is throwing an error file.cpp(155) : error C2536: 'TWin::bitmaps' : cannot specify explicit initializer for arrays How can I fix this? Upvote 0 Downvote
Thanks. It has caused an error elsewhere in the program I have a constructor which begins as follows TWin(HWND _hwnd,int _id) : hwnd(_hwnd),id(_id), bBack(0),bSpr(0),hClip(0),bitmaps(0) { bitmaps(0) is throwing an error file.cpp(155) : error C2536: 'TWin::bitmaps' : cannot specify explicit initializer for arrays How can I fix this?
Feb 9, 2006 #4 Salem Programmer Apr 29, 2003 2,455 GB How about trying bitmaps[0](0) To initialise the first element of the array. If you want to initialise all the elements of the array, then I suggest a loop inside the body of the constructor. -- Upvote 0 Downvote
How about trying bitmaps[0](0) To initialise the first element of the array. If you want to initialise all the elements of the array, then I suggest a loop inside the body of the constructor. --