السلام عليكم
أخواني بدي مساعدة أنا كتبت هاد الكود بس فيه خطأ ومحتاجة تصحيح الو
هاد هو الكود
<include<iostream.h#
class stack
{public:
int top;
int size[5];
int push(int i);
int pop(int i);};
int stack::push(int i)
{if (top==5)
cout<<"stack is full"<<"\n";
else
{size[top]=i; top++;}
return(i);}
int stack::pop(int i)
{if (top==0)
cout<<"stack is empty"<<"\n";
else
{size[top]=i; top--;}
return(i);}
main()
{stack x;
int stack::size[5]
{size[5];
size[top]=1;
top++;
size[top]=2;
top++;
size[top]=3;
top++;
size[top]=4;
top++;
size[top]=5;
top++;}
cout<<"push stack x:.\n";
cout<<x.push(7);
cout<<"pop stack x:.\n";
cout<<x.pop(9);
return(0);}
بلييييييييز ساعدوووني جزاكم الله خير ..