C++ Tutorial for Beginners Ep#10 - #define Macros and Macro Functions - SavvyNik
C++ Tutorial for Beginners Ep#10 where we learn about the defining Macros/Macro Functions with the #define preprocessor directive in C++. Marcos can help user define various constants / functions that will be filled in by the preprocessor. They can help condense code into one-liners and allow the program to reuse already know function or values. C++ macros can be used with existing preprocessor directives.This C++ Tutorial is for Beginners is intended for learning the concepts of C++. Use Visual Studio Code or any text editor to follow along. Make sure to subscribe so you can follow the series.
When using preprocessor directives and C++ Macros you can define which portion of the code should be compiled. This is good for build/debug compilations. Where you might not want to include debug statements in the final build. A Macro with #ifdef / #ifndef could help you achieve this without having to write two separate files. Let's explore Macros and some of their uses together in this #define Macros and Macro Functions episode of C++ Tutorial for Beginners.
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