I know there are a lot of questions similar to this one but i looked through them and really couldn't find my answer.
I am working on Kubutu, editing code in Kate and compiling with g++11 (like "g++ -std=c++11") and i often get this error "Segmentation fault". I often searched and read about it and i found out you usually get this one when you try to use undeclared memory so i usually do my best to debug my program, but today i did something else which gave me a a curious result.
I tried to compile the same code that takes segmentation error on my compiler. So i used an online IDE. ("https://ideone.com/") and the program worked exactly as it should. Any of you can tell me why it did so, or if not, at least how do i stop getting Segmentation fault on my codes for no reason ?
Thank you in advance! :D If it is of any help this is the code i used : http://ift.tt/1RKw7R2
Aucun commentaire:
Enregistrer un commentaire