Ad
  • Custom User Avatar

    I second this, or just freaking array would make more sense. The problem says to return a [x, y], I shouldn't have to poke through the test cases to figure it wants an vector with 2 entries.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Then one of the built in test is borked I think.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Makes sense, cause :: means its in the scope of my Same class?
    I c++ well enough and I have no idea how these tests work in back end so I know better than waiste my time trying to figure that out.
    Like that sample test file doesn't run on its own does it?

    But anyway, thanks!

  • Custom User Avatar

    main.cpp:7:1: error: expected unqualified-id
    public :
    ^
    main.cpp:18:16: error: use of undeclared identifier 'Same'
    bool ans = Same::comp(a, b);
    ^
    2 errors generated.

    C++, this doesn't seem to work at all? At first because I am a C++ nub I thought I was having an overflow or something but this happens if you don't touch the code so surely its an error on Codewars side?