From my understanding, inline and extern variables both do similar things, with the difference being that with extern, the variable has to be defined somewhere else. I've noticed that I only get warnings and not errors when I do something like extern int i = 10; and don't define it anywhere else.
Are there any other differences between inline and extern? Why don't I get errors when I assign a value to an extern variable and not define it anywhere else?
Asked
Active
Viewed 76 times
1
-
Does [this](https://stackoverflow.com/questions/38043442/how-do-inline-variables-work) help you? – Pouya Imani Jul 15 '21 at 05:45