Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Actually,
#include <string>
probably should be in the initial solution too.Got it, fixed
rand
is undeclared. (Why did you change random number generation at all if it already worked?)That semicolon in the initial solution is really unnecessary...
Yeah, that's what I was saying.
https://www.codewars.com/kumite/5b44e5e26be5d8d6260000d2?sel=5d49de18dbaa24001a65ca4d
There's
string
in the solution. Solutions shouldn't rely on undocumented code in Preloaded.But:
using namespace std;
It just shouldn't be in the Preloaded code.
Undeclared identifiers:
string
,to_string
.Extraneous empty statement in the initial solution.
The name of
control
can be visible in error messages, then it can be called from solutions.control
uses the value ofn
that can be changed by solutions.I do not know if it is commonly done like this, but maybe the control function should be moved into your testing code instead of the preloaded code.