Namespaces
Variants
Actions

class

From cppreference.com

Here is how you create class in c++.

class foo{ public:

   foo(); //ctor
   foo(int mFoo); //ctor with argument
   int getFoo() const; //getter method
   void setFoo(int mFoo); //setter method

private:

   int mFoo; //data member

};

//implementation foo::foo(): mFoo(0){ }

foo::foo(int mFoo): mFoo(mFoo){ }

int foo::getFoo(){

  return mFoo;

}

void foo::setFoo(int mFoo){

  this->mFoo = mFoo;

}