Timeline for error: non-const static data member must be initialized out of line
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 21, 2023 at 14:36 | comment | added | Fabio says Reinstate Monica |
This approach requires the user of the class to know how to correctly initialize it (in this case to INT_MIN ). It would be better if the correct value was set by the class itself. That said, there's no need to pass the variable by address: doing it allows the class to modify the original value inside main , but you are trying to do the opposite. For that, passing by value is enough.
|
|
May 19, 2023 at 19:27 | review | Late answers | |||
May 22, 2023 at 21:11 | |||||
S May 19, 2023 at 19:06 | review | First answers | |||
May 19, 2023 at 20:15 | |||||
S May 19, 2023 at 19:06 | history | answered | omkar sawant | CC BY-SA 4.0 |