c++ class function to create webcount system

trying to make a system to get, hit, reset, and set. I have to use private and public. the objective is to establish some webcounter to display how many users are visiting a page.

my goal is to have the code run and when it says set, i can type in a number, when i type in hit, i add one to the number, get gives me the number and reset brings the number to zero.

I'm lost o.o can someone help?

this is what i have so far and any help would be appreciated :)


class Webcounter{

int number_hits;

int get();
void hit(int hit value )
void set(int value);
void reset(int reset value);

void webcounter::set(int value){
int Webcounter::get(){
int get();
return number_hits;


int main(){
Webcouter wc;
cout << wc.get() << << endl;
cout << wc.get() << << endl)

Topic archived. No new replies allowed.