Declaring Classes in C++
P | N


#include <iostream.h>

#include <string.h>

class book {

public:

book(char *, char *, int);

void show_book(void);

private:

char title[64];

char author[64];

int pages;

};

class catalog_card : public book {

public:

catalog_card(char *, char *, int, char *, int);

void show_card(void);

private:

char catalog[64];

int checked_out; // 1 if checked out, otherwise 0

};


Previous | Next


Last modified at 8/5/97; 12:33:03 PM
Other Links of Interest
College of Computing | EduTech Institute | GVU Center
Mark Guzdial | Papers | CS 2390 Spring '97 Home Page | STABLE | MMC-CaMILE

Slide Master