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.
Code ran with warning on local and online compiler with Clang++8.0.1 (was Clang++ freaks out), but that was enough to be treated by Codewars as an error:
In file included from main.cpp:6:
./solution.cpp:16:7: warning: variable 'i' is incremented both in the loop header and in the loop body [-Wfor-loop-analysis]
i++;
^
./solution.cpp:12:35: note: incremented here
for (int i = 0; i < s.size(); i++) {
^
./solution.cpp:12:23: warning: comparison of integers of different signs: 'int' and 'std::__cxx11::basic_string<char, std::char_traits, std::allocator >::size_type' (aka 'unsigned long') [-Wsign-compare]
for (int i = 0; i < s.size(); i++) {
~ ^ ~~~~~~~~
2 warnings generated.
/tmp/main-1368cb.o: In function
do_test(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)': main.cpp:(.text+0x15): undefined reference to
solution(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'clang: error: linker command failed with exit code 1 (use -v to see invocation)