Is there any case, where missing a #include
would break the software at runtime, while the build still goes through?
In other words, is it possible that
#include "some/code.h" complexLogic(); cleverAlgorithms();
and
complexLogic(); cleverAlgorithms();
would both build successfully, but behave differently?
Love can't give you the flu. But the hormone fluctuations associated with love and heartbreak — particularly the stress hormone cortisol — can prompt physical symptoms that affect your long-term health. Lovesickness can also make you sick indirectly.
Missing someone hurts. The ache of yearning for another person can cause you to experience sadness, emptiness, despair, or a deep sense of absence. Most people understand that these feelings are normal following the loss of a loved one or when a close friend moves away.
Signs That You're Missing SomeoneExperiencing a sense of longing. Eating more or less than you normally do. Feeling lovesick. Feeling lonely or isolated.
The feeling you get when you miss your partner means that your brain is seeking them out and typically your oxytocin and dopamine levels drop. As Tara L. Skubella, relationship expert and tantra coach with Earth Tantra, tells Bustle, "Physical touch, sexual and heartfelt connection increases these levels.
Yes, it's perfectly possible. I'm sure there are lots of ways, but suppose the include file contained a global variable definition which called a constructor. In the first case the constructor would execute, and in the second it wouldn't.
Putting a global variable definition in a header file is poor style, but it's possible.
Yes, that's possible.
Everything concerning #include
s happens at compile time. But compile time things can change behavior at runtime, of course:
some/code.h
:
#define FOO int foo(int a) { return 1; }
then
#include <iostream> int foo(float a) { return 2; } #include "some/code.h" // Remove that line int main() { std::cout << foo(1) << std::endl; #ifdef FOO std::cout << "FOO" std::endl; #endif }
With the #include
, overload resolution finds the more appropriate foo(int)
and hence prints 1
instead of 2
. Also, since FOO
is defined, it additionally prints FOO
.
That's just two (unrelated) examples that came to my mind immediately, and I'm sure there are plenty more.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With