The very basic V5 Text program must include the following basic program structure:
#include "vex.h" using namespace vex; vex::brain Brain; int main() { // code segments go here return 0; }
BUT:
When the V5 IDE creates a project for you, it creates a file called robot-config.h by default. This file has already included the following: brain Brain;
Therefore, you should not declare another instance of “Brain” again in your code. All samples below assume the following template setup:
Scope: This document will cover primitive data types, fundamentals for how to use them, as well as caution about common mistakes.
- What are the Bare Basics in Creating Variables
- What you Need to Know About Variables for Other Real Numbers
- Why can't a Variable be Changed?
- Using Boolean Type Properly
- Why are Some Variables Outside {...} and Some Inside {...}
- The Cardinal Rules in Variable Names
- The Best Practice for Global vs Local Variable Declaration