原创 【c/c++】第一次使用-lwiredtiger時報錯:can not open shared object file

編譯鏈接報錯:can not open shared object file: no such file or directory 1. sudo vim /etc/ld.so.conf 2. 因爲libwiredtiger.so默認

原创 【c/c++】multiple definition-->static & extern

當遇到重複定義的時候經常會碰到這樣的錯誤,對於這個錯誤的理解,找到兩篇博客,第一篇博客解釋了爲什麼會出現這個錯誤,第二篇解釋了static和extern的作用。 http://blog.csdn.net/xxxxxx91116/artic

原创 【Ubuntu】安裝字體

轉載:http://www.mycode.net.cn/platform/741.html Ubuntu安裝Consolas字體 字體安裝 //解壓壓縮包 tar -zxvf YaHeiConsolas.tar.gz //在系統目錄下創

原创 【C/C++】虛析構函數

直接從代碼看結果 // demo 1 class Base { public: Base() { cout << "Base Constructor" << endl; } ~Base() {

原创 【每週任務】一、rpc

2018年5月26日

原创 [golang] go語言依賴

本想介紹 vendor,發現兩篇介紹太好了,就不多說了,直接傳送門 https://ieevee.com/tech/2017/07/10/go-import.html https://studygolang.com/articles/

原创 【c/c++】function returns address of local variable

這個問題很普通,也很常見,例如下面的代碼就會報這個錯,原因在於: s是局部變量,在棧上分配空間,當函數結束後會回收空間,這樣s返回的內容無效。 解決方法是在堆上申請空間,然後返回,但是這樣做需要注意釋放空間。 char* func()