命令列引數
C語言部份:
#include <stdio.h>
#include <stdlib.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int main(int argc, char *argv[]) {
printf("testing now\n");
if(argc!=3){
printf("successful part1\n");
}
printf("%s",argv[0]);
return 0;
}
CMD部分:
PS:利用cmd開啟exe檔 並在其後輸入argc的值,可引入函數
重導
https://www.youtube.com/watch?v=xQXAnI9-Z2I&list=PLFI-nbR0eXR5x192m3XVGJzfJxbEcRo2Z&index=9
沒有留言:
張貼留言