How to use C++ commands on Terminal with Mac : How can I communicate with Terminal on Mac so that I can complete the following task?
I want to ask for the IP or ID of a Raspberry Pi from the user, then utilize the input to connect to the Raspberry Pi.
I have tried the code below, but it won't work, says "no matching function call to system".

    cout << "What is the Raspberry Pi's IP address or ID? ";
    string raspiID;
    cin >> raspiID;
    cout << endl;
    string command = "ssh pi@" + raspiID + "";
    system(command);