Hello I am using Ubuntu 18.04 and I am very new to Ros. I was using ros kinetic. I have switched to the Ros melodic version and I am getting a compilation error in my cpp file. Below you can see my code and error I will be very happy if you could help. this is my code:
    #include <ros/ros.h>
    #include <std_msgs/String.h>
    #include <move_base_msgs/MoveBaseAction.h>
    #include <actionlib/client/simple_action_client.h>
    #include <iostream>
    #include <string.h>
    
    using namespace std;
    
    /** Function Declarations **/
    bool moveToGoal(double xGoal, double yGoal, double yaw);
    void choose();
    
    //code*****
    
    
    
    void move(const std_msgs::String msg){
        cout << "move Function activated" << endl;
        //***code
    }
    
    int main(int argc, char** argv){
        ros::init(argc, argv, "map_navigation4");
        ros::NodeHandle n;
    
        ros::Subscriber sub = n.subscribe ("server_messages", 1, move);
    
        ros::spin();
        return 0;
    }
    
    bool moveToGoal(double xGoal, double yGoal, double yaw){
        //**code
    }
and this error message: enter image description here
 
    