0
Is there a way to debug a code in sololearn?
as the title suggests - i an currently writing a code but in order to check it and see if it works i can only see compilation error or runtime error is there a way to debug it inside sololearn to search for logical error or do i have to use a launguage specific compiler?
5 Answers
+ 4
can print every few iterations
like every 10th using if condition
if(i%10 == 0)
cout << something something
+ 4
don't sweat it
nothing wrong with rewriting the code
sometimes it's better to have a fresh start than patching holes all over the place.
in the end, it's just more practice which never hurts ;)
+ 3
just use cout at critical point
print out values
addresses
whatever helps
0
but if i have for example a loop that runs a lot of times it would mean i would print that value a lot of times - even if i add text it can be hard to track
sometimes just the end of the loop isnt enough :/
0
its a good idea in general (so first of all thx for the idea :) )
but i started with a realy not efficient code for my problem to go to a more effective one later on
lets just say i have a lot of loops - with recursive included....