Created
January 16, 2017 10:16
-
-
Save YaoC/4c3a5b2deac75203be5e974e665aaa1b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main(int argc, char *argv[]) { | |
cout<<"你输入了"<<argc-1<<"个参数"<<endl; | |
if(argc==1) | |
return 0; | |
if(argc==2) | |
cout << "读入图片" << argv[1] << endl; | |
if(argc==3) { | |
cout << "指定尺寸错误!\n"; | |
return 0; | |
} | |
if(argc==4){ | |
cout << "读入图片的大小为" << argv[2] << "*" << argv[3] << endl; | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment