diff options
Diffstat (limited to 'structures/task8.cpp')
| -rw-r--r-- | structures/task8.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/structures/task8.cpp b/structures/task8.cpp index 099795d..15832d2 100644 --- a/structures/task8.cpp +++ b/structures/task8.cpp @@ -39,16 +39,16 @@ int main() cout << "n = "; cin >> n; stack *head = NULL; - char x; + int x; for (int i = 0; i < n; i++) { cin >> x; - push(head, int(x)); + push(head, x); } reverse(head); stack *res = result(head); while (res) - cout << char(pop(res)) << " "; + cout << pop(res) << " "; cout << endl; return 0; |