I designed one mfc vc++application in which data received from udp is stored in file as well as in stack.I used stl for stack; it stored elements as per receiving order,but i want to return repetitive number from stack,how to use stack as function parameter & retrieve elements of stack as an array? I write code for push elements in stack given below.If any changes in that function please suggest.
1 2 3 4
<template< typename T > void pushElements( T &stackRef,int value)
{
stackRef.push( value);
}/>