摘要: #include #include using namespace std;int main(int argc,char **argv){ /*程序在启动是会通过main的参数传入参数,argc表示参数的个数(包括程序名),argv是一个字符串数组 它包含程序名称和每个参数;假如程序的运行命令如下: test.exe tt 22 33,则argc为4,argv为test.exe tt 22 33 */ try { if(argc<4) throw string("传入的参数不正确!"); } catch(string e) { cout<<e<< 阅读全文
posted @ 2013-07-16 14:43 louiskoo 阅读(4017) 评论(0) 推荐(0) 编辑