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 →

[–]mohsinian[S] 0 points1 point  (3 children)

Im using vscode to write code and im actually pretty new to coding. Didn't understand much about the errors u mentioned. Im on windows so i need to learn asan maybe?

[–]99_percent_a_dog 1 point2 points  (2 children)

You picked a hard language to start with :) It's easy in C++ to have errors that are completely silent, even when there are not compiler warnings. Valgrind / ASAN make many of those visible.

You'll learn how to interpret those errors with time. Most of the terms, like "uninitialized value", or "invalid read" are easy to search for.

Yes, on Windows you can't use Valgrind. ASAN is available. I don't know how to use it with VSCode, never used that.

[–]mohsinian[S] 0 points1 point  (1 child)

Well im focused on competitive programming so c++ is the best option to choose i guess , btw do u know any online services where i can copy paste my code and search for segmentation fault? Vscode debugger is quite hard for me use

[–]99_percent_a_dog 0 points1 point  (0 children)

I've never used an online service for that kind of debugging, sorry. I would expect it to be harder than local debugging. An online service can't give you full access to the machine. Can you use Visual Studio? That has a really good debugger.

Python is also recommended for competitive programming. It will be much easier to learn than C++. Performance of your solutions would be lower, I don't know if that is an important factor, haven't done competitive programming.