Me adding comments while grading student code:

"bool SmartFixedArray<T>::IsFull() const
{
if (ARRAY_SIZE == m_itemCount)
{
return true;
}
else
{
return false;
}
throw runtime_error("Not implemented");
}

You need to remove the "Not Implemented" exception once you've implemented a function."

Follow

@Moosader I also like to point out that

if (...) { return true; } else { return false;}

can always be replaced with

return ...;

because ... is a boolean expression with exactly the value you're returning.

@peterdrake yeah I usually do that though I feel like I probably showed that exact thing in the class video itself so ehhh they not watching

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.