class Tab_Konst
{
public:
char ch, buffer[4028];
int max;
Tab_Konst();
~Tab_Konst();
void Win_tab();
void Creat_tab();
void Print_tab();
struct dan_tab
{
char tip[10];
dan_tab *next;
int elem;
};
dan_tab *per;
};
void Tab_Konst::Tab_Konst()
{
;
}
void Tab_Konst::Creat_tab()
{
int key, i = 1;
char ch; max = 0;
dan_tab *tek, tip_konst[10]; per = NULL;
clrscr();
cout<<"Vvedite konstantu : ";
cin>>key;
per = new(dan_tab);
tek = per;
(*per).elem = key;
(*per).next = NULL;
cout<<"Vvedite tip konstanti : ";
cin>>tip_konst[i].tip;
cout<<tip_konst[i].tip;
i++;
cout<<"Prodolgit vvod? y/n \n";
cin>>ch;
while (ch=='y')
{
cout<<"Vvedite konstantu : ";
cin>>key;
(*tek).next = new(dan_tab);
tek = (*tek).next;
(*tek).elem = key;
(*tek).next = NULL;
cout<<"Vvedite tip konstanti : ";
cin>>tip_konst[i].tip;
cout<<tip_konst[i].tip;
i++;
cout<<"Prodolgit vvod? y/n \n";
cin>>ch;
if (ch=='n')
{
cout<<"Press F2 to exit";
;break;
}
}
max = i;
};
/********************************************************************************
*/
void Tab_Konst::Print_tab()
{
dan_tab *q, tip_konst[10];
char ch;
int y = 7, k = 0;
Win_tab();
gotoxy(2,25);
cout<<" Alt-C - Add Alt-X - Delete F2 - Menu ";
gotoxy(2,2);
q = per;
if (q==NULL)
{
cout<<" V dannoy tablice net konstant ";
cout<<" Press F2 to exit... ";
// ;break;
}
else
{
gotoxy(3,4);
cout<<" |---------------------------------------------------------------------|\n";
gotoxy(3,5);
cout<<" | Konstanta | Tip |\n";
gotoxy(3,6);
cout<<" |---------------------------------------------------------------------|\n";
}
while (q != NULL)
{
gotoxy(15,y);
cout<<(*q).elem;
q = (*q).next;
gotoxy(40,y);
cout<<tip_konst[k].tip;
y++;
k++;
}
}
dan_tab *tek, tip_konst[10]
cin>>tip_konst[i].tip;
cout<<tip_konst[i].tip;
i++;