When i use AddItem[Located in sTab struct. I get an error about Char*Item_Name. It Compiles fine just when I call that one function everything got a problem.
https://img710.imageshack.us/img710/6668/errorml.png
[php]struct sItem
{
char* Name, **Options;
int* Value;
bool Selectable;
sItem(char* NAME, char** OPTIONS, int* VALUE, bool SELECTABLE)
{
Name=NAME;Options=OPTIONS;Value=VALUE;Selectable=S ELECTABLE;
}
~sItem()
{}
};
struct sTab
{
int noItems, totHeight;
char* Name;
sItem* Items;
int Selected;
void AddItem(char* Item_Name, char** Options, int* DefaultValue=0)
{
Items[noItems]=sItem(Item_Name, Options, DefaultValue, true);
noItems++;
totHeight=(noItems*15);
}
void AddText(char* Item_Name, char* Option)
{
Items[noItems]=sItem(Item_Name, (char**)Option, 0, false);
noItems++;
totHeight=(noItems*15);
}
sTab(){
Name="New Tab";
noItems=0;
totHeight=60;
Selected=0;
}
~sTab()
{
Items=new sItem((char*)NULL,(char**)NULL, (int*)NULL, (bool)NULL);
Name=(char*)NULL;
noItems=0;
totHeight=0;
}
};
[/php]