Hi
im really new to coding so sorry if this is a stupid question.
I need to learn to use stacks for my coursework and when practicing them iv followed the workshop instructions but some reason visual studios is not like it.
i get the same error every time that "stack identifier is undefined"
In function 'int main()':
26:2: error: 'stack' was not declared in this scope
26:2: note: suggested alternative:
In file included from /usr/include/c++/4.9/stack:61:0,
from 5:
/usr/include/c++/4.9/bits/stl_stack.h:99:11: note: 'std::stack'class stack
Having usingnamespace std; is not recommended. In the end the easiest thing to do is just pre-pend std:: to every std thing, as wildblue says. There is plenty written about this all over the internet.