■要求定義
– 現在いる位置を表示する
■考察
-getcwd()のカレントディレクトリ取得を使う
#include <stdio.h>
int main(){
char pathname[256];
getcwd(pathname, 256);
printf("%s\n", pathname);
return 0;
}
$ ./dev
/home/vagrant/dev
これは何も考える事ないです。
ソフトウェアエンジニアの技術ブログ:Software engineer tech blog
随机应变 ABCD: Always Be Coding and … : хороший