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.
Thank you everyone for your help.
I learned a lot about arrays in C and the ways of allocating memory.
I also learned about the markup within the comments.
In the future I will only use the
issue
tag if I'm really sure that there is no bug in my code. But that probably won't be the case with C. ;-)with this line:
you do not allocate enough memory for an array of
int
of lengthlength_in
. the size of an array is not equal to its length, unless the array elements happen to have a size of one byte, which is not the case forint
.Please use the
question
tag to ask for help next timeYour allocated buffer is too small.
This comment is hidden because it contains spoiler information about the solution
Would you be so kind to at least post your code, so we could check what is the problem with it? please remember about code blocks and spoiler flag!
I think there is something wrong with the C random tests.
I always passing all tests, except one. And every time I am getting this error
Test Crashed
Caught unexpected signal: 6
Sometimes I also get this error but with an extra log. For example this one:
input was:
length : 61
{65, -60, -22, -15, 45, 34, -31, -43, -63, 96, -15, 66, -37, -62, 19, -29, -54, 24, -43, 96, -68, 87, 3, 61, -8, -44, 53, -6, -87, 14, 54, 78, 54, -68, -37, -2, 67, 32, 56, -97, 28, -60, 70, 92, -22, -11, -38, 25, -88, 19, 20, -55, 5, -78, -94, 98, -21, 59, -9, -7, -28}
expected:
length : 16
{28, -60, 70, 92, -22, -11, -38, 25, -88, 19, 20, -55, 5, -78, -94, 98}
but got:
length : 16
{91, 25, -64, -30, 40, 86, -66, -28, 1, 31, -35, 121, -98, 79, -95, -40}
After checking manually I think the expected array is wrong.
Your fix is correct. Now my attempt worked. Thank you.
Dennis, if you got the time and your solution at hand, please try it again. I think the problem is fixed...
re-raising DennisCook's issue. cpp test suite is broken
I'll look at this in depth when at home, I'm very limited on the smartphone.
possibly test suite is broken , then...
would you mind posting your attempt?
edit: think I found the .mistake the namespace problem indeed is in the test suite. unable to solve it immediately ...
I'm not using round. Which namespace shoud I use?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Very nice minimal code although a bit hard for a human to read. Nicely done though!
Loading more items...