#include <iostream>
#include "FileChar.h"
#include "getopt.h"
using namespace std;
int main(int argc,char *argv[]) {
int c;
while((c=getopt(argc,argv,"hv:f:d"))!=-1){
switch(c){
case 'h':
cout<<"Help Demo!"<<endl;
break;
case 'v':
cout<<"Verbose level="<<optarg<<endl;
break;
case 'f':
cout<<"File name is "<<optarg<<endl;
break;
case 'd':
cout<<"Debug model!"<<endl;
break;
case '?':
cout<<"Unrecognized option encoutnered "<<optopt<<endl;
/* no break */
default:
return -2;
}
}
return 0;
}