{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

pointers_variables

pointers_variables - printf"Top%d\n" S>Top...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Pointers to Objects void main() { Stack *S = new Stack(); S->Push(30); S->Push(40); printf("Top: %d\n", S->Top()); S->Pop(); printf("Top: %d\n", S->Top()); S->Pop();
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: printf("Top: %d\n", S->Top()); delete S; } Variable Declarations void main() { int a; a = 10; Stack S; for (int i=0; i<a; i++) S.Push(i); }...
View Full Document

{[ snackBarMessage ]}