相信大家都會碰到某些 platform 只能用 C 的情況,而此時想要用 vector, list 等
C++中好用的容器時,就會非常的困擾,下面這個 macro 是我目前用過最方便的,它
用macro來模擬整個vector,以後再也不用自己寫linked-list啦 🙂

只要把內容存成一個header file(gvec.h),要用時再 include 即可。
element的內容不限型別,int,double,char,甚至自訂的struct都ok!

詳細內容請參考 http://www.linuxsky.net/html/200605/3232.html[@more@]

Facebook Comments Box