//AhmedWafaa typing.

#include <iostream>

//calling Stacks 

#include <stack>

using namespace std;

 class information {
//declaring our private and public variables
 	private :
 		string name;
 	public:
 		string name1;


//our parameter constructor
 	information(string name)  {
    name1 =  name;
	}



	string nam2e(){
	   return name1;
	}
	

	void print() const{
		cout << "name" << ": " << name1  << endl;
	}
	

	};
	 
 
    
    int main () {


    stack<information> inform;
    inform.push(information("ahmed"));
	inform.push(information("ali"));
	inform.push(information("mike"));
    
    inform.pop();
	inform.top().print();
   
        

        
  
 	return 0;
 
 }

Leave a comment

Your email address will not be published. Required fields are marked *