g++-g main1.cpp -o main
gdb main
b 8
r
n
p inFile
print(void*)inFile
GNU gdb(Ubuntu 8.1.1-0ubuntu1)8.1.1Copyright(C)2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3or 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 main...done.(gdb) b 8
Breakpoint 1 at 0xef5: file main1.cpp, line 8.(gdb) r
Starting program:/home/ledi/cc/4/main
Breakpoint 1,main() at main1.cpp:88 ifstream inFile("test.txt", ios::in);(gdb) n
13if(inFile)(gdb) p inFile
$1=<incomplete type>(gdb)print(void*)inFile
$2=(void*)0x7ffff7dc9410<vtable for std::basic_ifstream<char, std::char_traits<char>>+24>