-
April 25th, 2013, 07:11 AM
#1
[RESOLVED] problems on resize an array:(
i have 1 class with several class's and 1 struture:
Code:
struct Images
{
HBITMAP ImageImage;
BITMAP Imagebm;
HDC ImagehdcMem;
HBITMAP ImageMaskImage;
BITMAP ImageMaskbm;
HDC ImageMaskhdcMem;
};
//the subclass
class subimages
{
public: int ActualSubimage;
public: int TotalSubimages;
public: struct Images *SubImages;
....................................
//how i use it:
..................
sprite2 a,b,c;
a.Visible =true;
a.Direction=Left;
a.Images.Image1.Stop.SubImages=(struct Images)malloc(1 * sizeof(struct Images));
....................
but i get these error:
"--------------------Configuration: Sprite2 - Win32 Debug--------------------
Compiling...
Test Sprite2.cpp
C:\Users\Joaquim\Documents\Visual C 98\Sprite2\Test Sprite2.cpp(23) : error C2440: 'type cast' : cannot convert from 'void *' to 'struct Images'
No constructor could take the source type, or constructor overload resolution was ambiguous
Error executing cl.exe.
Sprite2.exe - 1 error(s), 0 warning(s)"
i try search more code, but i get more errors
can anyone advice me?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|