Hi all!
The compiler returns a "duplicate class declaration" error from the lignes in blue when i try to compile my code. :-\
See the code below.
It seems that the problem is from the fact that the constructors and functions declared has the same name :o
Any suggestions ?
//-----------------------------------------------------------------
// Include Files
//-----------------------------------------------------------------
#include "windows.inc"
//-----------------------------------------------------------------
// Custom Data Types
//-----------------------------------------------------------------
struct BITMAPINFO_256
{
BITMAPINFOHEADER bmiHeader;
RGBQUAD bmiColors[256];
};
//-----------------------------------------------------------------
// Bitmap Class
//-----------------------------------------------------------------
class Bitmap
{
protected:
// Member Variables
HBITMAP m_hBitmap;
int m_iWidth, m_iHeight;
// Helper Methods
declare Free();
public:
// Constructor(s)/Destructor
declare Bitmap();
declare Bitmap(HDC hDC, LPTSTR szFileName);
declare Bitmap(HDC hDC, UINT uiResID, HINSTANCE hInstance);
declare Bitmap(HDC hDC, int iWidth, int iHeight, COLORREF crColor = RGB(0, 0, 0));
declare _Bitmap();
// General Methods
declare Create(HDC hDC, LPTSTR szFileName),BOOL ;
declare Create(HDC hDC, UINT uiResID, HINSTANCE hInstance),BOOL ;
declare Create(HDC hDC, int iWidth, int iHeight, COLORREF crColor),BOOL ;
declare Draw(HDC hDC, int x, int y);
declare GetWidth(),int { return m_iWidth; };
declare GetHeight(),int { return m_iHeight; };
};
Function overloading is not supported in Aurora!
regards
John
Thank you John!
"Function overloading" is the correct term that i needed. ;D
Anyway, i assume that by just renaming the functions as (myfunction1(), myfunction2(), ... ) i can get them work properly.
Thanks!
I am going to try this!
Cheers!
Yea took me a while to remember the correct term as well ;D
Renaming as you suggest will be fine.
regards
John