Ad
  • Custom User Avatar

    C++
    What is the meaning of this test failure:
    Expected: equal to "Error caught"
    Actual: "Error not caught"

  • Custom User Avatar

    Thank you so much.
    What do you mean by "Of course, you don't really need to do this just to solve the kata."? Can I also debug with the CodeWars editor environment?

  • Custom User Avatar

    Ok, I had thought my Visual Studio was not configured. For example, that I haven't updated igloo properly. But that's probably not the case.
    But there is still one problem. If I use the definition of the class Image given in the text, then it does not compile.

    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(129,18): error C2440: 'initializing': cannot convert from 'initializer list' to 'CentralPixels::Image'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(136,1): message : No constructor could take the source type, or constructor overload resolution was ambiguous

    On the website, however, a definition is apparently used that works. Can I have that too?

  • Custom User Avatar

    I use C++, Visual Studio 2022, Language Version is C++ 17.
    When I copy the SampleTests of this Kata into Visual Studio 2022, the compile complains about undefined symbol Unordered_Match:

    1>CentralPixels.cpp
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(101,54): error C3861: 'Unordered_Match': identifier not found
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(101,1): error C2664: 'void snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That(bool)': cannot convert argument 1 from 'std::vector<unsigned int,std::allocator>' to 'bool'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(101,40): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    1>A:\develop\Training\CodeWars.cpp\import\igloo\external\snowhouse\snowhouse\assert.h(109,19): message : see declaration of 'snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(105,54): error C3861: 'Unordered_Match': identifier not found
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(105,1): error C2664: 'void snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That(bool)': cannot convert argument 1 from 'std::vector<unsigned int,std::allocator>' to 'bool'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(105,40): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    1>A:\develop\Training\CodeWars.cpp\import\igloo\external\snowhouse\snowhouse\assert.h(109,19): message : see declaration of 'snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(109,54): error C3861: 'Unordered_Match': identifier not found
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(109,1): error C2664: 'void snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That(bool)': cannot convert argument 1 from 'std::vector<unsigned int,std::allocator>' to 'bool'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(109,40): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    1>A:\develop\Training\CodeWars.cpp\import\igloo\external\snowhouse\snowhouse\assert.h(109,19): message : see declaration of 'snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(113,54): error C3861: 'Unordered_Match': identifier not found
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(113,1): error C2664: 'void snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That(bool)': cannot convert argument 1 from 'std::vector<unsigned int,std::allocator>' to 'bool'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(113,40): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    1>A:\develop\Training\CodeWars.cpp\import\igloo\external\snowhouse\snowhouse\assert.h(109,19): message : see declaration of 'snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(117,54): error C3861: 'Unordered_Match': identifier not found
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(117,1): error C2664: 'void snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That(bool)': cannot convert argument 1 from 'std::vector<unsigned int,std::allocator>' to 'bool'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(117,40): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    1>A:\develop\Training\CodeWars.cpp\import\igloo\external\snowhouse\snowhouse\assert.h(109,19): message : see declaration of 'snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(122,54): error C3861: 'Unordered_Match': identifier not found
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(122,1): error C2664: 'void snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That(bool)': cannot convert argument 1 from 'std::vector<unsigned int,std::allocator>' to 'bool'
    1>A:\develop\Training\CodeWars.cpp\CodeWars\CentralPixels.cpp(122,40): message : No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
    1>A:\develop\Training\CodeWars.cpp\import\igloo\external\snowhouse\snowhouse\assert.h(109,19): message : see declaration of 'snowhouse::ConfigurableAssertsnowhouse::DefaultFailureHandler::That'
    1>Done building project "CodeWars.vcxproj" -- FAILED.

  • Custom User Avatar

    Assert::That( image.central_pixels(1), Fulfills(Unordered_Match(red_ctr)) );

  • Custom User Avatar

    Inside the tests of this kata.

  • Custom User Avatar

    What is Unordered_Match?

  • Custom User Avatar

    the variable sign in function determinant is not used. I forgot to remove it.