Image

Imagefemme_one wrote in Imagecpp 😯confused

whats wrong with my code?

im learning how to use stacks in C++ and this is the simple code i made:

#include < stack >
#include < iostream >

int main()
{
stack< int > intStack;
}

i copied this code from my C++ Primer book by Lippman. However, when i compile it, it gives me this error:

Compiling...
main.cpp
main.cpp(18) : error C2065: 'stack' : undeclared identifier
main.cpp(18) : error C2062: type 'int' unexpected

so whats wrong with my code? haha, thanks for your help!