記錄codeblock的坑,暫時不用了

2021-09-19 05:54:06 字數 700 閱讀 2703

同樣的**:

test.h:

#ifndef test_h

#define test_h

#include using namespace std;

class employee

;class singer : public employee

;#endif // test_h

test.cpp:

#include "test.h"

employee::employee()

employee::~employee()

singer::singer()

singer::~singer()

main.cpp:

#include #include "test.h"

using namespace std;

int main()

上面的例子用來驗證:當用父類指標指向子類物件,刪除父類指標時,析構函式的執行順序的;

codeblock直接把:~singer()函式給吃了...

指不定後面又遇到什麼坑,暫時不用了...

Centos7 暫時記錄

chown 修改屬主和屬組資訊 chown r 對目錄所有子的子目錄和檔案進行修改屬主資訊 user tty from login idle jcpu pcpu what root tty1 23sep20 32days 0.04s 0.04s bash root pts 0 183.234.123...

PHP危險函式(23個)暫時記錄

在編譯 php 時,如無特殊需要,一定禁止編譯生成 cli 命令列模式的 php 解析支援。可在編譯時使用 disable cli。一旦編譯生成 cli 模式的php,則可能會被入侵者利用該程式建立乙個web shell 後門程序或通過php 執行任意 1.phpinfo 危險等級 中 2.pass...

採坑記錄switch坑

speed 0 switch speed speed 初始化為0後,你猜最終列印的結果是誰,最終列印的是150 因為switch條件的case判斷時只會有兩種結果,true false 初始化speed為0 走到第乙個case裡面,speed 不大於等於100 返回false,坑來了,因為初始值為0...