指针即地址,可以用于表达动态内存的地址。
虚拟内存机制
提交作业小插曲,我直接把之前的作业拉过来,导致git里面嵌套了git,提交失败,根据提示解决即可。
提示:You've added another git repository inside your current repository.
提示:Clones of the outer repository will not contain the contents of
提示:the embedded repository and will not know how to obtain it.
提示:If you meant to add a submodule, use: 提示: 提示: git submodule add <url> exercise55
提示:If you added this path by mistake, you can remove it from the index with:
提示:git rm --cached exercise55 提示:
提示:See "git help submodule" for more information.
提示:您在当前仓库中又添加了一个 git 仓库。
提示:外部仓库的克隆版本不会包含这个嵌入仓库的内容,也无法获取它。
提示:如果您想添加一个子模块,请使用:
提示: git submodule add <url> exercise55
提示:如果您误添加了此路径,可以通过以下命令从索引中移除它:
提示: git rm --cached exercise55
提示:有关更多信息,请参阅 “git help submodule”。
解决vscode编译问题,是因为编译命令中加了-g,要求调试。把-g去掉就不会出现这个问题了。
=thread-group-added,id="i1"
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Copyright (C) 2022 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:
<https://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".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
Stopped due to shared library event (no libraries added or removed)
Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Breakpoint 1, main () at /home/ubuntu2204/workspace/coursework-7.11/extend/People.cpp:8
8 teacherSpace::Teacher* teacher = new teacherSpace::Teacher("xiaomiTeacher", "PPT");
Loaded '/lib/x86_64-linux-gnu/libstdc++.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libgcc_s.so.1'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libc.so.6'. Symbols loaded.
Loaded '/lib/x86_64-linux-gnu/libm.so.6'. Symbols loaded.
[Inferior 1 (process 18628) exited normally]
The program '/home/ubuntu2204/workspace/coursework-7.11/extend/People' has exited with code 0 (0x00000000).
783

被折叠的 条评论
为什么被折叠?



