Why global variables should be avoided. Learn to code C++ with me. I easily explain arrays, for loops, local scope, syntax, etc. Here is a link to the most current VS code ( as of right now ): [ Ссылка ]
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 ( as of right now ): [ Ссылка ]
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"
NOTES FROM VIDEO:
do not use global variables
Ещё видео!