Classes and Objects

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2024

ความคิดเห็น • 2

  • @densewatermelon4277
    @densewatermelon4277 9 หลายเดือนก่อน +4

    Appreciate the videos man, really easy to understand 🙏🏼

  • @CamCoders
    @CamCoders  9 หลายเดือนก่อน

    #include
    using namespace std;
    // Classes act as 'blueprints' for objects
    // objects are things that YOU programmer create, and they consist of attributes and methods. They mimic real world objects like cats, chair, car etc.
    // attributes are variables that you declare or assign to an object
    // methods are user defined functions that allow the object to interact and do things.
    class Cat
    {
    public:
    string name;
    string color;
    int age;
    bool isInternetFamous;
    void eat(){
    cout