336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

개념 : 


1. direct.h 에 포함되어 있습니다.


2. 원형 : 

 -현재 작업중 디렉터리 : char* _getcwd(char* buffer, int maxlen);

-디렉터리 변경 : int _chdir(char* buffer);  // return -1 error, 0 success




소스코드 : main.c


#include <stdio.h>

#include <stdlib.h>//_MAX_PATH 사용하기 위해 선언

#include <direct.h>


int main(void)

{

char currentPath[_MAX_PATH];

const char *pChangePath = "C:\\Users\\junmo\\Desktop\\300\\123\\ChangeDir";


_getcwd(currentPath, _MAX_PATH);


puts(currentPath);

puts("change Path");

_chdir(pChangePath);

_getcwd(currentPath, _MAX_PATH);

puts(currentPath);


system("pause");


return 0;

}




결과 :



+ Recent posts