Ad
  • Default User Avatar

    On Codewars, you write code (usually one or several functions) that will be tried against a test suite. Your code and the tests suite are run in the same process (you can see your code as constituting a small library). Hence, you are not supposed to define your own main() function: the tests suite already contains one. Thus, the compiler complains:

    error: conflicting types for 'main'.
    ./solution.cpp:44:5: note: previous definition is here
    

    remove the main function, and your code will compile.

  • Custom User Avatar

    Seems like a relatively easy lvl 6, for JS :D