 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Sat Dec 16, 2006 2:22 am Post subject: Problem with Handling Event OnClick and Overriding |
|
|
Hi!
I have a problem with my project on University. I am to create a simple
game with X and O. I want to create 25 TImages, but with some more
parameters. So I tried to override a class TImage and got Errors I
cannot understand.
class myimage : protected TImage
{
public:
int get_number() const { return number; };
private:
int number;
};
Problem is, when I create dinamicaly a board 5x5 of myimage(s):
myimage * board[1][1];
board[1][1]= new pole;
board[1][1]->Width=100;
board[1][1]->Height=100;
board[1][1]->Top=100;
board[1][1]->Left=100;
board[1][1]->Show();
On: myimage * board[1][1]; it shows me the error:
[C++ Error] image1.cpp(25): E2125 Compiler could not generate default
constructor for class 'myimage'
Also I want to assign a function to OnClick Event to all those objects,
but don't know how to (I tried multiple options and it hasn't worked).
How to do that for myimage class? Let's say that I want to change value
of int number, when I click on myimage object.....
**Sorry about my English, I've learned it for so many years, but there
are still problems. |
|
| Back to top |
|
 |
Guest
|
Posted: Sat Dec 16, 2006 7:22 am Post subject: Re: Problem with Handling Event OnClick and Overriding |
|
|
Hi! It's me again.... about using Event OnClick I've made it lastly
myself, so now I need only help with classes....
Please help me fast. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|