Global functions in multi-file projects in C
HTML-код
- Опубликовано: 19 янв 2022
- Source code can be found here:
code-vault.net/lesson/ys1aqur...
===== Support us through our store =====
code-vault.net/shop
===== Check out our website =====
code-vault.net
===== Check out our Discord server =====
discord.code-vault.net
Glad to see you back!
You earned yourself a subscriber :)
@ Codevault
Your videos are helped me alot to get concept more understandable can you pls explain what is difference in C structure and C++ structure
I'll look into it
Thank u!!!!!
Amazing
very good
can you explain when we write a function definition in a .h file, even after using header guards why do we use the "inline" keyword?
Sure, I'll make a video on that
@@CodeVault thanks! appreciate it.
Thank you👌, how can I make the run button run the whole program or files in my project instead of typing each of them in VS code?
It works in Code Blocks IDE but I can't do it in VS code!
There is a video on this topic that you can find here: code-vault.net/lesson/ublnbln8uf:1603733528013
it means that we need to write .h file fot each .c file?
Usually, yes
Is it new series tutorials?
Yea with just a few videos on it
why do we need global.c for implementation ? cant we write in global.h itself ?
No. If you do that and include global.h in multiple C files of the same compilation you'll receive an error due to the definition of the function being found twice in that same compile. So, you have to somehow prevent that. This is one way of doing it