I am trying to create a simple stack but the compiler (visual c++ 6.0) is saying that 'stack' is an undelcared identifier. I am keying in the source code directly from a text book. Whats wrong
program:
#include <iostream>
#include <stack>
int main()
{
int n;
double item;
stack<double>numbers; //this is where I get the error 'stack':undelcared identifier
cout<<"type number"<<endl
cin>>n;
for (int i=0; i<n; i++);
{
cin>>item;
numbers.push(item);
}
}