2013年4月7日

install and use boost::thread

摘要: I am describing how to use boost::thread libaray below.step1. download boost fromhttp://www.boost.org/, e.g.boost_1_52_0.tar.gzstep2. extract the fileboost_1_52_0.tar.gz toboost_1_52_0step3. cd to the boost file, boost_1_52_0, and exectutesh bootstrap.sh --prefix=$HOME/boost --with-libraries=threads 阅读全文

posted @ 2013-04-07 20:34 Torstan 阅读(273) 评论(0) 推荐(0) 编辑

an array of zero length

摘要: an array of zero length is a hack which is used to for variable size of array, since the element of zero length in a struct does not exist from the point of view of the storage, while it exists from the point of the compiler.Here is a sample code.#include <stdio.h>#include <stdlib.h>stru 阅读全文

posted @ 2013-04-07 19:56 Torstan 阅读(228) 评论(0) 推荐(0) 编辑

导航