FRC Robot Programming

C++ Basics

In this chapter, you will learn to write and understand basic C++ programs.

You must pay a lot of attention to this section because it will lay the groundwork for you to understand increasingly complex programs and systems.

As noted before, type every line of code that you see. Do not copy it please!

Sections:

  • Structure of a program
    • This section will talk about how a C++ program is made and how it works at a very superficial level.
  • Variables
    • This section will teach you to work with variables, such as numbers and strings.
  • Operators
    • This section will talk about how to work with, modify and manage variables in your programs.
  • Methods and Functions
    • This section will teach you to organize your code by dividing it into small, specialized sections, which are known as methods and functions.
  • Control Flow
    • This section will teach you to make decisions in your program and will explain you the basic boolean logic.