Access specifier's and classes and objects?

Posted by TimothyTech on Stack Overflow See other posts from Stack Overflow or by TimothyTech
Published on 2010-06-09T16:54:07Z Indexed on 2010/06/09 17:02 UTC
Read the original article Hit count: 143

Filed under:
|
|

Alright, im trying to understand this,

so a class is simply creating a template for an object.

class Bow
{

int arrows;

};

and an object is simply creating a specific item using the class template.

Bow::Bow(arrows)
{
arrows = 20;
}

also another question, public specifiers are used to make data members avaible in objects and private specifiers are used to make data memebers only avaialble inside the class?

© Stack Overflow or respective owner

Related posts about c++

Related posts about class