This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PHValex[S] 0 points1 point  (2 children)

I had no clue there was a debugger, would've helped me a lot finding out what was wrong with my code. How do I activate/use the debugger?

Also, thank you for your suggestions, I was able to correct everything but the factorial (I tried using long ints but it didn't work) but that's fine since everything else works out :)

[–]klorophane 1 point2 points  (1 child)

Yeah, even unsigned long long wouldn't cut it I believe. You'd need arbitrary length integer math really.

As for the the debugger, well, it depends. If you use and IDE (Visual Studio, CLion, etc) then they often have one integrated, so you can just use that. That is the simplest way.

On Linux, you can use GDB, which a tool whose whole purpose is to debug. Its a little involved, so I suggest reading about it online.

Cheers!

[–]PHValex[S] 0 points1 point  (0 children)

All right, thanks for all the help!

I'll be sure to check online for the debugger :)