Classes with No Class 151
35 const int end_magic;
36 public:
37 info(void):
38 start_magic(START_MAGIC),
39 end_magic(END_MAGIC)
40 {}
41
42 // Copy constructor defaults
43 // Assignment operator defaults
44 // Destructor defaults
45
46 // Store some data in the class
47 void set_data(
48 // Data to be stored
49 const char what[]
50 )
51 {
52 strcpy(data, what);
53 }
54
55 // Get the data from the class
56 char *get_data(void)
57 {
58 return (data);
59 }
60
61 // Verify that the magic
62 // numbers are correct
63 void check_magic(void)
64 {
65 if ((start_magic != START_MAGIC) ||
66 (end_magic != END_MAGIC))
67 {
68 std::cout <<
69 "Info has lost its magic\n";
70 }
71 }
72 };
73
74 /************************************************
75 * new_info -- Create a new version of the *
76