G
Gactimus
Can anyone explain what the lines with the '*' by them do?
-----------
#ifndef _COUNTER_H
#define _COUNTER_H
#include <iostream>
using namespace std;
class Counter
{
public:
int count;
public:
* Counter(){count = 0;}
void operator ++() { ++count; }
int GetCount() { return count; }
void SetCount( int c ) { count = c; }
void PrintCount() { cout << "\n The count is " << count; }
};
class NewCounterublic Counter
{
public:
* void operator --() { --count; }
};
#endif
-----------
#ifndef _COUNTER_H
#define _COUNTER_H
#include <iostream>
using namespace std;
class Counter
{
public:
int count;
public:
* Counter(){count = 0;}
void operator ++() { ++count; }
int GetCount() { return count; }
void SetCount( int c ) { count = c; }
void PrintCount() { cout << "\n The count is " << count; }
};
class NewCounterublic Counter
{
public:
* void operator --() { --count; }
};
#endif