Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Stack
- {
- const int MAX_SIZE = 200;
- struct Rep;
- typedef Rep& stack;
- stack create();
- void destroy(stack s);
- void push(stack s, int i);
- int pop(stack s);
- }
- struct Stack::Rep
- {
- int ar[200];
- int top;
- };
- "expected a identifier" and "initial value of reference to non-const must be an lvalue" :
- Stack::stack Stack::create()
- {
- Stack::stack = new Rep();
- }
- "reference variable "s" requires an initializer"
- Stack::stack Stack::create()
- {
- Stack::stack s;
- }
Add Comment
Please, Sign In to add comment