24.14 OTHERS
const int THREE =3 ;
class Matrix
{ private: int X[THREE][THREE]; public : friend void multiply(Matrix A, Matrix B, Matrix &C); void show(); Matrix(); Matrix(int box[9]); void set(int i, int j, int val) ; int get(int i, int j ) ; } ; const int MAX = 10 ;
class Mat10
{ private: int X[MAX][MAX]; int N ; public : friend void multiply(Mat10 A, Mat10 B, Mat10 &C); void show(); Mat10(); Mat10(int dimN) ; void init(int box[], int num); // initialisation void set(int i, int j, int val) ; int get(int i, int j ) ; int getN(); int is_diagonal() ; // 1 true 0 false };
Following classes use declaration:
typedef char str20[20]
class Planet ...
Get Object Oriented Programming with C++, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.