Here is the error I am getting.
CruiseShip.h:10: error: expected ‘;’ before ‘::’ token
CruiseShip.cpp:8: error: expected ‘)’ before ‘name’ make: ***
[CruiseShip.o] Error 1
CruiseShip.h
CruiseShip(std::string name,std::string year, int maxPassengers)::Ship(std::string name,std::string year);
CruiseShip.cpp
CruiseShip(string name, string year, int maxPassengers)::Ship(string name, string year){
    maxPassengers=0;
}
These are the line's where the error occurs.
Here is the rest of the code: CruiseShip.cpp
#include <iostream>
#include "Ship.h"
#include "CruiseShip.h"
using namespace std;
CruiseShip(string name, string year, int maxPassengers)::Ship(string name, string year){
    maxPassengers=0;
}
void CruiseShip::setPass(int maxPassengers){
    this->maxPassengers=maxPassengers;
}
int CruiseShip::getPass(){
    return maxPassengers;
}
void CruiseShip::print(){
    cout<<"The name of the ship is "<<getName()<<endl;
    cout<<"The capacity of the ship is "<<maxPassengers<<endl;
}
CruiseShip.h
#ifndef CRUISESHIP_H_
#define CRUISESHIP_H_
#include <string>
class CruiseShip: public Ship{
protected:
    int maxPassengers;
    
public:
    CruiseShip(std::string name,std::string year, int maxPassengers)::Ship(std::string name,std::string year);
    void setPass(int);
    int getPass();
    virtual void print();
};
#endif
 
     
     
     
     
    