• 大小: 607B
    文件类型: .c
    金币: 1
    下载: 0 次
    发布日期: 2021-06-05
  • 语言: C/C++
  • 标签: cd  

资源简介

该程序是我写的博客“一起talk C栗子吧(第七十四回:C语言实例--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

评论

共有 条评论