Class example
The following code declares a class string:
class string {
char data[80];
public:
void store(char*);
int length();
};
The char data[80] is the data, store() and length() are methods. Only the two methods are accessible to the outside world. The data are private.