aqui tienes un ejemplo de una clase Flight.
#include "flight.h"
#include <iostream.h>
#include <iomanip.h>
#include <string.h>
class Flight {
public:
void init (char flight_no[],
int dep_h, int dep_m,
int arr_h, int arr_m);
void info ();
void delay(int min);
private:
char no[7];
clock dep, arr;
};
void Flight::init (char flight_no[],
int dep_h, int dep_m,
int arr_h, int arr_m);
{
strcpy(no, flight_no);
dep.set(dep_h, dep_m, 0);
arr.set(arr_h, arr_m, 0);
}
void Flight::info()
{
cout << "flight no " << no;
cout << ", Dep "; dep.write(false);
cout << ", Arr "; arr.write(false);
cout << ednl;
}
void Flight::delay(int min)
{
for(int i=1; i<=min*60; i++)
dep.tick();
for (int j=1; j<=min*60; j++)
arr.tick();
}