You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know why the website reported an error but didn't show it.
But maybe I can help with the code. Look at the constructor. In the function body it assigns num = num;. That doesn't work, officially it reads an uninitialized member variable num (invoking undefined behavior), but in practice that statement will probably do nothing, and num still has an "indeterminate value".
Instead initializenum in the "member initializer list", just like elems: : elems(num), num{num} { } In that context the first num in num{num} refers to the member variable, the second one to the parameter.
I'm on the site: https://exercism.org/tracks/cpp/exercises/circular-buffer/edit
My .hh source code is:
The .cc source code is the default
The text was updated successfully, but these errors were encountered: