0
Output of C++ code
Hello, another C++ question about the output of the following code, can someone explain it? https://code.sololearn.com/cDD63zTxAafs/#cpp
5 odpowiedzi
+ 3
b is static. It mean that this variable is for any object of this class the same. If you increase b in object x it increase b in object y too.
Static variable is for all class, not for each object like other variables.
+ 1
@Martin Taylor
Yes, I already found this out from Derlas Forenly's answer, but thank you anyway.
0
This makes sense now, thank you Derlas Forenly.