C++ Tutorial for Beginners Ep#14 - Variable Scope - SavvyNik

Channel:
Subscribers:
72,300
Published on ● Video Link: https://www.youtube.com/watch?v=TeekQFAT-jQ



Category:
Tutorial
Duration: 8:33
3,183 views
150


C++ Tutorial for Beginners Ep#14 where we learn about Variable Scope and and how to use Variable Scope in C++. Variable Scope can help distinguish variables in your program. Understand what Local & Global Variables and why they are important in C++. Variable Scope in C++ comments can also help delete unnecessary variables once you are finished with them called temp variables. Today we'll explore Variable Scope in depth and understand how and where it is used in C++.

You've used Scope and Scope Variables a bunch of times and probably didn't even realize it. Everything between { } are considered local scope and anything outside the main function or any other function can be considered a global scope variable. We'll go and explore this in more depth and understand C++ Global & Local Scopes, as well as, variables.

My Linux Cheat Sheet and 25 Page Checklist here:
📚 https://learn.savvynik.com

Share this free tool and support Small YouTubers
https://editbulk.com
(I made this tool to help creators)

Want more info/content?
https://savvynik.com

Useful Commands/Links:

Windows 10 Compiler Tools Setup - https://youtu.be/hCLIDph7-mU
Visual Studio Code - https://code.visualstudio.com/

Online Compilers:
https://www.onlinegdb.com/online_c++_compiler
http://cpp.sh/
https://repl.it/languages/cpp

Great List of Online C++ compilers:
https://arnemertz.github.io/online-compilers/#tldr

Windows Compiler Tools - GCC (GNU Compiler Collection) MinGW64
Linux Compiler Tools - Build-Essentials (GCC)

Name of extensions installed:
1. Code Runner
2. C/C++ Intellisense

#Linux #Programming #ComputerScience


00:00 Intro
00:10 Local Scope
00:46 Global Scope
01:25 Local Scope Variable Example
02:25 Second Example (w/ Error)
03:42 If Statement Scope Example
05:00 Reusing Variables
05:37 Global Scope Example
06:37 Bonus - Access Global instead of Local
08:15 - Outro




Other Videos By SavvyNik


2020-11-10C++ Programming - Limits for Basic Data Types (numeric_limits) - SavvyNik [Highlight]
2020-11-07Veloren Online Play - Adventure Time.. on Linux (Q&A)
2020-11-06C++ Programming - Size of Basic Data Types using Visual Studio - SavvyNik [Highlight]
2020-11-04How to Install SSH Server on Windows 10 - Remote into a computer using Command Line [OpenSSH]
2020-11-03C++ Review #5 for Beginners - Programming using For Loops, While Loops, and Continue - SavvyNik
2020-11-02C++ Tutorial for Beginners Ep#15 - Break, Continue, and Goto - SavvyNik
2020-10-31Veloren Online Play - Halloween Special.. on Linux (Q&A)
2020-10-30Super Easy C / C++ Tools Install on Linux - Create and Compile Your First Program with GCC / G++.
2020-10-29Genshin Impact Live - Pirates Quest? (Part 4)
2020-10-28Fedora 33 Linux | with BTRFS by Default - Workstation
2020-10-27C++ Tutorial for Beginners Ep#14 - Variable Scope - SavvyNik
2020-10-26C++ Tutorial for Beginners Ep#13 - Single & Multi-line Comments - SavvyNik
2020-10-26Genshin Impact Live - Continuing Gameplay & Challenges. (Part 3)
2020-10-24Veloren Online Play - New Magic Skills.. on Linux (Q&A)
2020-10-24Pop OS 20.10 Linux | NEW UPDATES! with Window Stacking | System 76
2020-10-23Ubuntu 20.10 Linux - Updates & Features
2020-10-22Genshin Impact Live - Continuing Gameplay and Quests. (Part 2)
2020-10-22File Checksum & Integrity Check on Linux - File Security [Hash SHA-1/256/384/512/MD5] (Ubuntu)
2020-10-21C++ Tutorial for Beginners Ep#12 - While & Do While Loops - SavvyNik
2020-10-20How to a Setup Static IP Address in Linux using Netplan - Beginners Guide
2020-10-19C++ Tutorial for Beginners Ep#11 - For Loops - SavvyNik