-1
main()
의 인수를 초기화하는 방법은 무엇입니까?명령 줄 인수는 어떻게 지정합니까?
int _tmain(int argc, TCHAR *argv[])
항상 다음과 같은 오류가 발생합니다
// If the directory is not specified as a command-line argument,
// print usage.
if(argc != 2)
{
_tprintf(TEXT("\nUsage: %s <directory name>\n"), argv[0]);
return (-1);
}
나는이 오류가 발생하지 않습니다 무엇을 할 수 있습니까? , 디버거에서 프로그램을 실행하면
> myprogram c:\TheDirectory
:
Listing the Files in a Directory
어떻게 프로그램을 명령 줄에서 호출합니까? –
프로그램에 명령 줄에 인수를 지정하십시오. – cup
디버거에서 실행중인 경우 프로젝트 속성에서 해당 인수를 설정할 수 있습니다. –