#include <iostream> #include <cstring> using namespace std; void set_temp_iface(string iface) { string temp_iface; temp_iface.append(iface); cout << temp_iface << endl; } int main(int argc, char* argv[]) { if(strcmp(argv[1], "iface") == 0) set_temp_iface(string(argv[2])); return 0; } And the result is invisible. In the console, an empty string. What could be the reason? G ++ 5.4 compiler