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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access