this is my first question here at stackoverflow. I'll start by saying that although I have a bit of experience in C++, I still consider myself a beginner, no doubt on that, so keep in mind that complete answers or suggestions regarding not only coding but also posting on this website would be really appreciated.
My problem is, I'm making the classic newbie ASCII roguelike game (following this dude right here in case that matters) and despite some difficulties regarding game design, all of which I've pretty much overcome by now, it was going fine; however, I once tried executing the .exe file found in the Debug folder of the Visual Studio project using Windows' explorer, and, right after outputting some introductory text and requiring user input, when no vector had yet been declared whatsoever, it resulted in this error:
Microsoft Visual C++ Runtime Library
However, when attempting to compile and run the code using Visual Studio, both Release and Debug settings compile and run the program without any problem.
Now, I've already done some research and the most convincing thing it has pointed to is buffer overflow, with reason being things such as buffer and stack/heap memory are managed differently when started within IDE's than when started normally. I have a basic understanding of such concepts, however further explanation would be highly appreciated.
That said, I still think the most probable reason is me derping around with vectors and subscripts, which is strange because not only Visual Studio seems not to have any problem with me derping, but no vectors were yet declared. It would be tedious and annoying, but would it help if I tried converting every vector I have declared in the rest of the code into pointers so to exclude stack overflow?
I am open to suggestions and every comment is highly appreciated. Should I include my code? I have a couple of files to include so it would be... quite the read, but if anyone thinks that could help, I'd gladly paste it. Thanks in advance!
Edit: Forget about the post scriptum, it was fixed easily just by rebooting, and was mentioned just for the sake of completion; I'll leave it but know it's not important.
PS: Lately I've seen Windows 10 complaining about running windows store apps as the "built-in administrator account", while I never had a problem with that before, and I've always ever had one account. Could that be somehow related...?
Aucun commentaire:
Enregistrer un commentaire