Click to See Complete Forum and Search --> : Borland


MekMan
May 13th, 1999, 06:12 AM
Hi

I got a problem.
I´m trying to send the adress for a structure when constructing a new object out of a class.
It goes find when I´m doing it with an ordinary INT but with the structure I get the error messege:

"Can not find a match for class::class(structure *, int *) in function main...."

I dont think that it´s anything wrong spelling/missing in the code because the simple INT works fine alone, it got to do with the structure I think.

The Code (basicly):

//Main program
main()
{
struct structure
{
int array[4][4];
};
structure variable;

C_class class(&variable);
}


//The class definition
class C_class
{
private:
struct structure
{
int array[4][4];
};
structure *variable;
public:
C_class(structure *adress) ; //Constructor
};

(And the class.cpp file looks about the same)
(I wrote this code out of my head now, might be faults in it)

Mikael