alphaoide you da bomb I think that is exactly whut dude was asking for I did manage to do some raw dogg data manipulation check it out.
Code:
#include<iostream>
using namespace std;
template <class T, int n>
class stack
{
private: T elt[n];
int counter;
public:
void clearstack()
{
counter=-1;
}
bool emptystack()
{
return counter==-1?true:false;
}
bool fullstack()
{
return counter==n - 1?true:false;
}
void push(T x)
{
counter++;
elt[counter]=x;
}
T pop()
{
T x;
x=elt[counter];
counter--;
return x;
}
};
void main()
{
stack<float, 4> s;
stack<float, 4> t;
s.clearstack();
while(! s.fullstack() )
{
float data;
cout<<"Enter an integer data: ";
cin >>data;
s.push(data);
}
int a,b,c,d;
d=s.pop();
cout<<d<<endl;
c=s.pop();
cout<<c<<endl;
b=s.pop();
cout<<b<<endl;
b= b + c;
a=s.pop();
a=a*b;
a=a+d;
s.push(a);
cout << "The total is: " << a << endl;
}
so that was the plug and punch method. Any suggestions