資源簡介
該程序是我寫的博客“一起talk C栗子吧(第七十四回:C語言實(shí)例--DIY cd命令)”的配套程序,共享給大家使用
代碼片段和文件信息
/*?**************************
?*?The?cd?command?of?shell
?*?*************************/
#include?“main.h“
int?cds(const?char?*p)
{
char?path[PATH_SIZE];
char?*start;
char?*end;
int?res;
int?n=?0;
memset(path‘\0‘PATH_SIZE);?//?must?init?ohtrway?there?is?a?wrong?result?with?@
start?=?strchr
- 上一篇:C:DIY shell
- 下一篇:牛頓法潮流計(jì)算C++語言編寫
評(píng)論
共有 條評(píng)論