Functions in C++

Functions in C++ allow you to group a set of statements together and give them a name, so that you can use them multiple times in your program. Functions can also accept parameters and return values. Here’s an example of a simple function in C++ that takes no parameters and returns no value: This function […]

Read More Functions in C++

LOOPS in C++

Why was the for loop feeling cold? Because it left its i out! Loops in C++ allow you to execute a block of code multiple times, based on a certain condition. There are a few types of loops in C++, but the most commonly used are for loops, while loops, and do-while loops. A for […]

Read More LOOPS in C++

If statements in C++

if statement” in C++ is used to check if a certain condition is true or false. If the condition is true, a block of code will be executed. If the condition is false, the block of code will be skipped. Here’s an example of an if statement in C++: In this example, the condition being […]

Read More If statements in C++

Pointers and references in C++

To build a robot I might have to know Pointers and References: Pointers and references are features in C++ that allow you to directly manipulate the memory of a program. A pointer is a variable that stores the memory address of another variable. You can think of a pointer as a special type of variable […]

Read More Pointers and references in C++

LEARNING ROS

What is ROS? ROS (Robot Operating System) is a set of software libraries and tools that help you build robot applications. It provides a common framework for robot software development and can be used in a wide range of robotic applications, from simple robots to complex systems. ROS is designed to be modular and flexible, […]

Read More LEARNING ROS

C++ Variables

C++ variables are a way to store values in a program. Think of a variable like a container that you can put a value into, and then later retrieve it from. There are different types of variables, each with their own specific use and characteristics. For example, some common variable types in C++ are: To […]

Read More C++ Variables

how prompts the user to enter an integer, a floating-point number, and a character, and then prints them out in c++

Use the cin (short for “console input”) function to read input from the user. For example, to read an integer, you can use the following code: This will print the message “Enter an integer:” to the console, and then wait for the user to enter a value. Once the user enters a value, it will […]

Read More how prompts the user to enter an integer, a floating-point number, and a character, and then prints them out in c++

C++ Data Types

In C++, there are different ways to store and use information, just like there are different types of containers to store different things. in C++ there are several other data types besides int, float, char, and bool. Here are a few examples: In this example, we create variables of different types, with different values. “pi” […]

Read More C++ Data Types