摘要: #include<stdio.h>int main(int argc,char* argv[]){ optget(argc,argv,"r:v"); int opt; while((opt=optget(argc,argv,"r:v")!=-1){ switch(opt): case 'i': todo; break; case 'r' printf("%s",optarg); break;}}optget中参数三,为命令选项,如果带冒号:则表明选项后面要跟文件名... 阅读全文
posted @ 2012-09-16 18:36 勿在浮沙筑高台 阅读(283) 评论(0) 推荐(0) 编辑
摘要: hello,World 阅读全文
posted @ 2012-09-16 13:34 勿在浮沙筑高台 阅读(183) 评论(0) 推荐(0) 编辑