Marisa
May 17th, 1999, 02:30 AM
How do u initialize a structure inside a class e.g
class Mail
{
public:
struct VM{
char current[20];
char dtmf;
char next[20];
void (*ifptr)(int,int);
};
typedef VM VMail;
VMail Mailme[] = {
{ "qq", 'd', "ww", Function1},
{ "aa", 'w', "eee", Function2},
};
}
The compiler cannot recognize the initialization here. How do i put this part of the initialization code in the constructor?
VMail Mailme[] = {
{ "qq", 'd', "ww", Function1},
{ "aa", 'w', "eee", Function2},
};
I already tried putting it in the constructor but it still cannot work. How else can i initialize my structure?
Thanks
class Mail
{
public:
struct VM{
char current[20];
char dtmf;
char next[20];
void (*ifptr)(int,int);
};
typedef VM VMail;
VMail Mailme[] = {
{ "qq", 'd', "ww", Function1},
{ "aa", 'w', "eee", Function2},
};
}
The compiler cannot recognize the initialization here. How do i put this part of the initialization code in the constructor?
VMail Mailme[] = {
{ "qq", 'd', "ww", Function1},
{ "aa", 'w', "eee", Function2},
};
I already tried putting it in the constructor but it still cannot work. How else can i initialize my structure?
Thanks