Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ---------------------------- Code
- #include<bits/stdc++.h>
- using namespace std;
- queue<string> q;
- int main()
- {
- q.push("test");
- q.push("str123");
- cout<<q.front();
- return 0;
- }
- // --------------------------- GDB output
- /*
- ubuntu@ubuntu:~$ g++ -g test.cpp
- ubuntu@ubuntu:~$ gdb ./a.out
- GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1
- Copyright (C) 2016 Free Software Foundation, Inc.
- License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
- This is free software: you are free to change and redistribute it.
- There is NO WARRANTY, to the extent permitted by law. Type "show copying"
- and "show warranty" for details.
- This GDB was configured as "x86_64-linux-gnu".
- Type "show configuration" for configuration details.
- For bug reporting instructions, please see:
- <http://www.gnu.org/software/gdb/bugs/>.
- Find the GDB manual and other documentation resources online at:
- <http://www.gnu.org/software/gdb/documentation/>.
- For help, type "help".
- Type "apropos word" to search for commands related to "word"...
- Reading symbols from ./a.out...done.
- (gdb) b 6
- Breakpoint 1 at 0x400d7f: file test.cpp, line 6.
- (gdb) r
- Starting program: /home/ubuntu/a.out
- Breakpoint 1, main () at test.cpp:7
- 7 {
- (gdb) print q
- No symbol "q" in current context.
- (gdb) n
- 8 q.push("test");
- (gdb) print q
- No symbol "q" in current context.
- (gdb) n
- 9 q.push("str123");
- (gdb) print q
- No symbol "q" in current context.
- (gdb)
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement