# 💻Open Class: C++ classes in ROS2

**URL:** <https://discourse.openrobotics.org/t/open-class-c-classes-in-ros2/27064>\
**Category:** Training & Education\
**Tags:** ros2\
**Created:** [August 24, 2022, 3:09pm UTC](https://discourse.openrobotics.org/t/open-class-c-classes-in-ros2/27064 "2022-08-24T15:09:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sonia\_W](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/sonia_w/32/19646_2.png) [@Sonia\_W](https://discourse.openrobotics.org/u/Sonia_W)\
**Post date:** [August 24, 2022, 3:09pm UTC](https://discourse.openrobotics.org/t/open-class-c-classes-in-ros2/27064/1 "2022-08-24T15:09:50Z")

</div>

![ROS Developers Open Class152](https://us1.discourse-cdn.com/flex022/uploads/ros/original/2X/0/05496596f51ab976f71ea07a84e9a08facc7678a.jpeg)

**C++ classes** are essentially a code template for creating an object. They play an essential role in creating robot applications since they allow you to create code that is better organized and much easier to understand, debug, maintain and upgrade.

In this Open Class, you will get an introduction to using C++ classes in your ROS programs.

You’ll learn:

- What is **OOP** & What is a **C++ class**
- Data members and access specifiers
- **Constructors** and **deconstructors**
- Basic structure of a C++ class in ROS

You will be using TurtleBot 2 throughout the training

Join Open Class Here ➡ [C++ classes in ROS2 - hands-on Open Class | The Construct](https://bit.ly/3CrVDHM)
