How to use the #ifdef and #ifndef preprocessor directives for conditional compilation in C. Source code: github.com/por.... Check out www.portfolioc... to build a portfolio that will impress employers!
I am working on a project where I need to run my C code on different Operating Systems and to make this portability the use of pre-processing directives are essential! Thank you for the class!
Great video as always. I was wondering if you could make a video about socket programming in c, because i haven't found many videos that explain this topic on UA-cam, and the ones i found don't really explain it in detail like you do in your videos. Your content is very informative. Keep up the good work man.
hey when you use -E that mean you stop in the first step (pre-processing) and the file d give you the result of this step. Please if this is correct tell me (options) how can get the other steps of compilation (compiling - assembling - linking)
Yes, that is correct. In terms of how to get the other steps of compilation I can't recall off the top of my head, but it should be covered in this documentation here or similar documentation: gcc.gnu.org/onlinedocs/gcc/Overall-Options.html. :-)
Another Question :) I have this block of code in a header file (my_header_file.h) : #ifndef MYHEADER_H # define MYHEADER_H /* some declaration functions */ #endif My question is: there is a relation between the name of headerfile (my_header_file.h) and this macro MYHEADER_H? And what's the reason for using this Macro?
Great question! :-) It's basically a "guard" to make sure things aren't being defined multiple times by including the header file multiple times, these answers here go into better detail than I can: stackoverflow.com/a/1653965.
i just cant believe why your courses do not have most views for c youtube tutorials. Thank you so much for these lessons!!!
I am working on a project where I need to run my C code on different Operating Systems and to make this portability the use of pre-processing directives are essential! Thank you for the class!
Great video as always. I was wondering if you could make a video about socket programming in c, because i haven't found many videos that explain this topic on UA-cam, and the ones i found don't really explain it in detail like you do in your videos. Your content is very informative. Keep up the good work man.
Thank you so much Mohammed! I definitely want to cover sockets and other types of network programming in C one day. :-)
@@PortfolioCourses Thank you. I'm looking forward to it :)
This is art thanks
thank youuuuuuuuuuuuuuuuuuu
You're welcome Tareq! :-)
Thank you.
Very helpful.
You’re very welcome Amine! :-D
nice
thanks bro
hey when you use -E that mean you stop in the first step (pre-processing) and the file d give you the result of this step. Please if this is correct tell me (options) how can get the other steps of compilation (compiling - assembling - linking)
Yes, that is correct. In terms of how to get the other steps of compilation I can't recall off the top of my head, but it should be covered in this documentation here or similar documentation: gcc.gnu.org/onlinedocs/gcc/Overall-Options.html. :-)
@@PortfolioCourses thank you Sooo much kevin :)
You're welcome! :-)
perfect
Thank you! 🙂
Another Question :) I have this block of code in a header file (my_header_file.h) :
#ifndef MYHEADER_H
# define MYHEADER_H
/* some declaration functions */
#endif
My question is:
there is a relation between the name of headerfile (my_header_file.h) and this macro MYHEADER_H?
And what's the reason for using this Macro?
Great question! :-) It's basically a "guard" to make sure things aren't being defined multiple times by including the header file multiple times, these answers here go into better detail than I can: stackoverflow.com/a/1653965.
@@PortfolioCourses I suggest to you to create a server discord if you want :) ( to discuss with other members of channel ) it's just a suggestion ;)
@@appdeveloppement532 The issue is then administering the Discord server. 🙂 Maybe one day when I have more resources/money available.
@@PortfolioCourses ah Yeah Yeah okey :)