How to Include File Guards - Why to Include Fileguards in C or C++ Header Files

  Рет қаралды 84,313

Paul Programming

Paul Programming

Күн бұрын

Пікірлер: 177
@juanma_cello
@juanma_cello 3 жыл бұрын
This is the best explanation someone could give me for this issue. Dude you're brilliant.
@javxa
@javxa 5 жыл бұрын
Awesome explanation, step-by-step. Keep it up!
@JamateyLP
@JamateyLP 6 жыл бұрын
I searched a lot, and finally I found such a brilliant video. Thank you so much !!! This is one of the best explainations I have ever seen, slow (so that everyone can follow) and also showing everything so that everyone understands. THANKS!
@Tweek5470
@Tweek5470 4 жыл бұрын
I really loved that you went through the code step by step to show what the compiler was doing. That really helped, thanks!
@DrudoPT
@DrudoPT 2 жыл бұрын
So simple and straight to the point, truly a master at work!
@TheArien
@TheArien 5 ай бұрын
9 years later and your video is still super relevant. You saved me from hours of useless work of trying to reconfigure my entire project structure.
@shaneshort93
@shaneshort93 Жыл бұрын
Ah, thank you! I looked up numerous videos on this because the C++ Udemy course I am taking introduced File Guards and I couldn't understand why the alias in the file guards could be so arbitrary, but the way you explained it helped clear that up perfectly. Thank you for that!
@lawrenegummy4736
@lawrenegummy4736 5 жыл бұрын
I love how you go through each line and explain what does what instead of what you should just do. It helps a lot when we understand why something is done instead of when you should just do it. You have a fan in me. Liked and Subbed, please do more videos.
@shamarahshoup5253
@shamarahshoup5253 Жыл бұрын
Instant subscribe. Explained this faster in 5 minutes than my professor in 3 weeks
@kacperracing5798
@kacperracing5798 4 жыл бұрын
Hey Paul, I found your video much better than the one I got linked in my class. Very clear, very simple and very fast. Thanks for your help! thumbs up!
@FastshortvideoEurop
@FastshortvideoEurop 2 жыл бұрын
Hi Paul you have the best display screen than the other teachers well done
@abdulsammadsaeed1199
@abdulsammadsaeed1199 3 жыл бұрын
THANKS MAAN!!! I WAS STUCK ON THIS FOR A WHILE. YOUR EXPLANATION IS TOP NOTCH!
@CarlosRedman3
@CarlosRedman3 Жыл бұрын
Bro that was clearest explanation I have ever heard. Great Job buddy . Thank you !
@lorenzolonghi8697
@lorenzolonghi8697 Жыл бұрын
Most simple and clear definition, good job and thank you
@elyrb1185
@elyrb1185 5 жыл бұрын
This is so informative, explanations were very clear and it helped me a lot in my project, thanks, you got yourself a subscriber :D
@Souffra
@Souffra 5 ай бұрын
Thank you, I finally got the explanation that I can understand. Bravo!!!
@vutuan4308
@vutuan4308 Жыл бұрын
Thank you for explaning so clearly. I've had difficulties with this since i studied OOP with C++.
@chrisr3947
@chrisr3947 5 жыл бұрын
Thank you for this explanation of file guards. I am fairly new to c++ and this was straightforward and easy to understand!
@Perceptionz_Sound
@Perceptionz_Sound 2 жыл бұрын
Thanks for your content and Great video. Ive been learning c++ out of a text book for the past couple weeks and these videos are a great way to visualize and make those new connections of things i cant picture or wrap my head around while reading and writing notes.
@kouko6727
@kouko6727 3 жыл бұрын
THANK YOU my cs professor didn't teach us about fireguards when we entered classes and inheritance and this redefinition was killing me for hours.
@paraspatil1375
@paraspatil1375 2 жыл бұрын
Best explanation you would find on youtube..bro just don't give up on sharing such awesome content. Thankyou for precious knowledge you have shared with us
@I_make_countless_mistakes
@I_make_countless_mistakes 2 жыл бұрын
Gosh!!! yours explanation is so clearr.
@sirjohn6299
@sirjohn6299 3 жыл бұрын
Very clear and concise explanation, you have earned a subscriber!
@hfe1833
@hfe1833 4 жыл бұрын
This is very useful for finding error in arduino library or debugging
@ZapPack
@ZapPack Жыл бұрын
This is greatly helpful and I like that you explained what ALL of the terms mean and what exactly is happening (ex. why "ifndef" is named the way it is) 👍
@areshaistg
@areshaistg 11 ай бұрын
it's probably if not defined. there's also "ifdef", "if", "else", and "endif". i'm not sure about others but it's called preprocessor directives :)
@김뉴비-f4z
@김뉴비-f4z Жыл бұрын
you are so genius you make me understanding Conditonal Compilation
@dansalvador5071
@dansalvador5071 2 жыл бұрын
I wasn`t planning to write a comment but bro thats awesome. thanks for the explanation.
@clawchette2622
@clawchette2622 4 жыл бұрын
Thank you so much! You just saved my project, you're my hero :p
@filippocucina7001
@filippocucina7001 2 жыл бұрын
The Best Explanation ever!
@KachraSethisLive
@KachraSethisLive 3 жыл бұрын
Thanks a lot this help me a lot i am trying to fix this issue from 36 hours but now it's fixed thankyou so much
@joevz8758
@joevz8758 5 жыл бұрын
Thanks for explaining every tid bit, this is rarely done in tutorials, Thanks!
@vaibhavpaliwal7754
@vaibhavpaliwal7754 2 жыл бұрын
BEST EXPLANATION EVER!!!!!
@Travelling_turtle07
@Travelling_turtle07 Ай бұрын
Thanksss, simple and straightforward
@SuperLuxen
@SuperLuxen 2 жыл бұрын
Exactly what I needed to know, thank's man!
@hiteshsinha7210
@hiteshsinha7210 2 жыл бұрын
thank this is the best explanation I have found.
@Crochetmagicc
@Crochetmagicc 4 жыл бұрын
this was a good explanation paul.
@peter_castle
@peter_castle 5 жыл бұрын
This videos helped a lot! Subscribed and will binge watch
@mrx-qi8th
@mrx-qi8th 3 жыл бұрын
Thank u thank u thank u Just cant thank you enought I learned something valuable and Managed to solve my problem Just subscribed
@zinhlekeswa5748
@zinhlekeswa5748 Жыл бұрын
Great explanation. Thank you Paul!!!😁
@JonCianci12
@JonCianci12 2 жыл бұрын
Perfect this is just what I was looking for!!
@jacobes5084
@jacobes5084 Жыл бұрын
Actually such a super helpful video thank you so much, what a 🐐
@achrafBadiry
@achrafBadiry 11 ай бұрын
Brilliant. I just had a problem understanding the "#endif" directive. thank you
@emanuelnolasco3745
@emanuelnolasco3745 2 жыл бұрын
I am dummie at C++ language and this was one of the best explanation I have seen. I just have one doubt, What is the meaning of "a.out" in the time 5:15? I don´t get it
@sivaramakrishnachitithoti839
@sivaramakrishnachitithoti839 6 жыл бұрын
Very good explanation... well explained with good example scenario..
@ayoubdkhissi
@ayoubdkhissi 3 жыл бұрын
Very clear explanation! thanks
@amurkhandzagkoev1842
@amurkhandzagkoev1842 2 жыл бұрын
I love it! Cool explanation!
@NeelSandellISAWESOME
@NeelSandellISAWESOME 5 жыл бұрын
Thank you so much. This really cleared things up for me.
@voidenth
@voidenth 10 ай бұрын
brilliantly explained
@jaakob1128
@jaakob1128 4 жыл бұрын
Good tutorial! Keep up the good work!
@intros1854
@intros1854 8 жыл бұрын
This tutorial is pretty clear! Thanks.
@stargazer2350
@stargazer2350 4 жыл бұрын
This is really great. Thank you Paul.
@MsGrooveOn
@MsGrooveOn 7 жыл бұрын
You should note about another approach (#pragma once)
@PaulProgramming
@PaulProgramming 7 жыл бұрын
Kirugan p Yes, that's a great idea. Thanks for the suggestion!
@lawrenegummy4736
@lawrenegummy4736 5 жыл бұрын
(#pragma once) is not an original component of C++, as such it may work properly on some compilers but it may not work with some. Traditional Header guards will however safely compile in most if not all C++ compilers.
@Hamstray
@Hamstray 2 жыл бұрын
the right approach is: do not nest includes
@sylvesteruchia5263
@sylvesteruchia5263 3 ай бұрын
We don't use pragma once in this house . Standard c++ instructions only .
@henrikstaaf3293
@henrikstaaf3293 5 ай бұрын
My god you are a good teacher my friend!
@henryharrison608
@henryharrison608 3 ай бұрын
Why are them fileguards in uppercase , what if the class was declared in uppercase
@zkkvfvfv5117
@zkkvfvfv5117 4 жыл бұрын
simple and straight to the point. thank you
@poggers69-o3s
@poggers69-o3s Жыл бұрын
excellent explanation
@mkhadka123
@mkhadka123 3 жыл бұрын
Nice and Easy, awesome video!
@justapasserby773
@justapasserby773 2 жыл бұрын
youre a life saver man
@moinaction
@moinaction 6 жыл бұрын
Best explanation ever!
@QuangHungNguyen-n2w
@QuangHungNguyen-n2w Жыл бұрын
Best explanation. Thanks
@thekiwininja99
@thekiwininja99 2 жыл бұрын
This was so helpful, thank you!!
@homamis639
@homamis639 6 жыл бұрын
Excellent Explanation!
@shaswat_292
@shaswat_292 7 ай бұрын
Crisp and Informative. Thanks
@cesarcalderon2499
@cesarcalderon2499 4 жыл бұрын
Thanks man i was having a hard time understanding it perfect thank you
@gaskomusic
@gaskomusic 4 жыл бұрын
Such a great explanation. Thanks!
@mickballard7400
@mickballard7400 6 жыл бұрын
Well explained Paul.
@rdxrdx1792
@rdxrdx1792 7 ай бұрын
Excellent exaplaination
@TViener
@TViener 8 жыл бұрын
Just subbed. Thanks for clearing this up for me!
@jokar_2541
@jokar_2541 2 жыл бұрын
ah man thanks a lot it's been days since i am tried to find a solution to this problem
@TheDrewfuss
@TheDrewfuss 9 жыл бұрын
Thanks for that. Very clear and quick.
@resolvedman
@resolvedman Жыл бұрын
U SAVE MY LIFE BRO!!!!!!!
@gauravpuri8716
@gauravpuri8716 2 жыл бұрын
Nice Explaination!!!
@kv6257
@kv6257 6 жыл бұрын
Thanks a lot , you explane me very good how to use header files and with g++ tool. Thanks !
@LukasanaTK
@LukasanaTK 8 жыл бұрын
explained it very well, subbed.
@Cutrexxx
@Cutrexxx 5 жыл бұрын
very good explaination. Can you pls tell me, for what are header files exactly?
@padmakumarnxt
@padmakumarnxt 5 жыл бұрын
Outstanding tutorial!!.. Subscribed... :)
@Fun-io9kv
@Fun-io9kv 3 жыл бұрын
Good explanation thanks
@muezapervaiz7163
@muezapervaiz7163 2 жыл бұрын
very well explained!
@dctsdev
@dctsdev Жыл бұрын
is there a usecase where you would have multiple Fileguards and name them differently in the same file?
@deathtoy101
@deathtoy101 4 жыл бұрын
when you define file guards does it always have to be in capital letters?
@grabbenskarve3518
@grabbenskarve3518 4 жыл бұрын
Try and see if you get an error.
@Avdheshkumar-kv5fz
@Avdheshkumar-kv5fz 2 жыл бұрын
just a bigggg..THANK YOU 😇
@xdigitalmondx2
@xdigitalmondx2 7 жыл бұрын
Great explanation! thank you.
@ednilsonalveslomazi8501
@ednilsonalveslomazi8501 4 жыл бұрын
man, thank you so much! But i have one question: In inclusion of standard libraries (...) how can i wrapper those includes to avoid redeclaration? Im creating a library, so, i dont know what the user will include in his application.
@MAsif-sz9md
@MAsif-sz9md Жыл бұрын
Thank you soo much ❤❤keep it up
@muhammadabumadeghem9675
@muhammadabumadeghem9675 5 жыл бұрын
you just give us a wonderfull answer . Thx
@ihateandreykrasnokutsky
@ihateandreykrasnokutsky Жыл бұрын
In Visual Studio, when you create a header file, there's an automatically created 1st line "#pragma once". As I understand, it serves the same purpose, but requires just 1 line of code.
@avartation
@avartation 7 жыл бұрын
thanks a lot man !!! helped me a lot
@Drogny
@Drogny 3 жыл бұрын
Great video, thanks!!
@metaverseclub5265
@metaverseclub5265 2 ай бұрын
brilliant video. Thank you
@gabriellegal4496
@gabriellegal4496 2 жыл бұрын
nice explanation
@bevedel
@bevedel 7 жыл бұрын
thanks for the great explanation
@charity4613
@charity4613 5 жыл бұрын
this video is amazing. thank you so much
@shoaibramjaun
@shoaibramjaun 6 жыл бұрын
what editor r u using?
@moardub
@moardub 4 жыл бұрын
Thank you for this video I appreciate this a lot.
@erickarias7619
@erickarias7619 27 күн бұрын
Good day . . . Hello ... How are you? You can include files with extensions .hpp and .cpp Can you do it in the MacOS IDE which is Xcode and run it through the terminal?
@justcurious1940
@justcurious1940 Жыл бұрын
Thanks Paul.
@PattysLab
@PattysLab 2 жыл бұрын
well explained!
@MrHighpour
@MrHighpour 6 жыл бұрын
Thank you so much! This helped!
@moazelsawaf2000
@moazelsawaf2000 5 жыл бұрын
Thanks a lot sir
@joeydicastro
@joeydicastro 6 жыл бұрын
Awesome Paul.
@funkykong9001
@funkykong9001 4 жыл бұрын
Couldn't compilers automatically detect this case and just ignore the repeat include?
why do header files even exist?
10:53
Low Level
Рет қаралды 449 М.
31 nooby C++ habits you need to ditch
16:18
mCoding
Рет қаралды 851 М.
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
Sigma Kid Mistake #funny #sigma
00:17
CRAZY GREAPA
Рет қаралды 30 МЛН
Une nouvelle voiture pour Noël 🥹
00:28
Nicocapone
Рет қаралды 9 МЛН
C++ Header Files
15:10
The Cherno
Рет қаралды 746 М.
BETTER Header Files and Preprocessor Debugging
24:26
The Cherno
Рет қаралды 75 М.
Header files and libraries (Kevin Lynch)
9:32
Northwestern Robotics
Рет қаралды 98 М.
Header Issues: Guards, Name Mangling, and extern "C"
8:32
Jacob Sorber
Рет қаралды 80 М.
you will never ask about pointers again after watching this video
8:03
7 Outside The Box Puzzles
12:16
MindYourDecisions
Рет қаралды 305 М.
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН