How to create an array in C++ using an int array. Basic array example explained with for loop. c++ e

79 Просмотры
Издатель
Introduction to arrays inside C++ using an int array. How to access elements inside an array or access an index inside of an array
Here is a link to the most current VS code: https://code.visualstudio.com/


In VS Code, this is how to make a directory:
- go to terminal
- while in the directory enter "cd" without the quotes - this stands for change directory
- enter mkdir - this makes a directory, however, you need to add a name for the directory. It should look something like ex: mkdir exampleNameHere
- then you should change your directory, so cd and change it to the name of the file you want to go to
- ex: cd exampleNameHere
- enter code . for new file to load

Link for C++ compiler using Ubuntu: https://ubuntu.com/

Command line ( after Ubuntu install ): g++ -Wall -Wextra -pedantic -std=c++17

then: ./a.out

* ( adds all files in current file ) ex: *.cpp or use file name ex: main.pp after "-std=c++17"

Terms to look up and notes from the video:

array - hold one data type
static arrays
dynamic arrays

const variables
naming variables correctly in C++

how to declare an array
multiple ways to declare an array
what is the index in the array
how many values are in the array
Категория
Язык программирования C++
Комментариев нет.