Answer the question
In order to leave comments, you need to log in
Why don't static and namespace limit scope?
"If a global variable is declared with the specifier static
, then the scope of this variable is limited to one file"
But in practice this does not happen. I can access a static global variable or a variable from an unnamed namespace from main()
, all I have to do is type that file into #include
Why doesn't it work?
How right?
Visual Studio 2010
Answer the question
In order to leave comments, you need to log in
eth1 temporarily loses the link. Find out in the description of your router which interface eth1 corresponds to. If the real port is connected to RJ45 - check the connected cable and the connectors themselves, as well as the device at the other end of this cable. Now, if this is an internal port - then you have to think.
Most likely, this is the wan port. The link sometimes jumps, ask the provider, he should have the same thing on the switches in the logs.
You can find out what this port is by going to the properties of the interface and there will be "Physical settings", it will say which eth belongs to which interface.
Disable lan ports one by one, look at the system log. So you can easily determine which port is disabled. And it can turn off either due to poor contact, or damage to the cable, or the device that is connected to it briefly disconnects the link.
the c++ compiler preprocessor replaces #include with the contents of a file that is written in <...> or "...". If you want to limit the scope, then write the implementation in cpp, not in h.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question