HI there i am trying to use the friend function but I am unable to access the private data members of my 2nd class : Hello there I am trying to access the private members of the class through the friend function here below my code is code is in complete


    #include<iostream>
    #include<string>
    #include<fstream>
    using namespace std;
    class time;
    class date{
    void friend  mixdatetime(date &c, time &d);
	int day;
	int month;
	int year;
    public:
    date(int day, int month, int year){
		this->day = day;
		this->month = month;
		this->year = year;
	}};
    class time{
	int hours;
	int minutes;
	int seconds;	
    public:
	time(int hours, int minutes, int seconds){
		this->hours = hours;
		this->minutes = minutes;
		this->seconds = seconds;}
	void print(){};} ;
    void mixdatetime(date &c, time &d){
	c.day; // accessable
	// why  //d.minutes // inacccess able };};

In this code when i try to access d.minutes or d.hours  // i can not because it is inaccessible why ? I am unable to access the private members kindly tell me appropriate solution
