Doubt on Stacks and Structures in Stacks

Правка en1, от chari407, 2018-02-04 08:17:02

Hi, I have a couple of doubts. 1. Can we use the standard C++ binary_search() on a stack<> ? 2. Suppose I declare

struct sig
{
int a;
int b;
};

sig temp[10];

stack<sig> trial;

Now I push a few "sig" elements to the "trial" stack. How do I access the second value (b) of the topmost element in the stack ?

Теги stack, data structures

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский chari407 2018-02-04 08:17:02 381 Initial revision (published)