Find the errors in the following class and explain how to correct them:
```
class Example
{
public:
Example( int y = 10 )
: data( y )
{
// empty body
} // end Example constructor
int getIncrementedData() const
{
return data++;
} // end function getIncrementedData
static int getCount()
{
cout << "Data is " << data << endl;
return count;
} // end function getCount
private:
int data;
static int count;
}; // end class Example
```
Error: The class definition for Example has two errors. The first occurs in function getIncrementedData. The function is declared const, but it modifies the object.
Correction: To correct the first error, remove the const keyword from the definition of getIncrementedData.
Error: The second error occurs in function getCount. This function is declared static, so it isn’t allowed to access any non-static member (i.e., data) of the class.
Correction: To correct the second error, remove the output line from the getCount definition.