Linux and windows Porting

摘要: // 根据本人的经验胡乱写写:// linux下获得可用磁盘空间大小采用: string sCmd = "df -m /usr/local | awk '{ if(NR == 2) print $4 }'"; string sResult = pipeIPC(sCmd); pipeIPC()如下:string pipeIPC(const string& command){ string sResult = ""; char *s = new char[2048]; bzero(s, 2047); FILE *fp = NULL; 阅读全文
posted @ 2011-06-07 21:30 几百人有爱 阅读(278) 评论(0) 推荐(0)