#include <iostream>
using namespace std;
int main(int argc,char* argv[]){
if(argv[1] == ""){
cout << "please put something" << endl;
}else if(argv[1] == "string"){
cout << "yeah string" << endl;
}else if(argv[1] == "integer"){
cout << "yeah integer" << endl;
}
}
I don't know what's wrong: I try to check if argument supplied for argv[1] is empty so it will be false
and application will exit, so please tell me what is wrong in my code.