Anyone have trouble with their console app?

I’m seeing a few people with this sort of problem when trying to create their 32 bit console app in Visual Studio…

You can also see it in more detail in this video…

Please try the steps listed here.

when i get into the “game”, and try to put in a guess, i get a message from the Microsoft Visual C++ Runtime Library. It tells me that the debug assertion failed. Anyone know how to fix this?

i get this message after i try and put a guess in. Im on the lecture where we start adding functions.

Have you tried running the game without debugging? Like Ctrl+F5 instead of just F5?

Yes, this happens when I dont debug. Really frustrating.

Hmmmm, from a bit of googling it looks like that particular error could be caused by initializing variables incorrectly. The example I found had a line like this:

string binaryNum = 0;

which is throwing an error because it’s trying to set a variable declared as a string with a value that is clearly an int.
This may be the case for you, try double-checking all your variable declarations?
Another thing you could try is what I like to call “binary search debugging” which is where I will simply put a breakpoint at some point roughly midway through the code execution flow and see if the error happens before the breakpoint is triggered. This can be useful in cases like this when the actual error message refers to some code deep inside a library and I’m not about to go digging in \microsoft visual studio 14.0\vc\include\xstring line whatever! If the breakpoint happens with no error, the error is occurring somewhere beyond that point in execution, so move the breakpoint farther along and try again. Likewise if get the error before seeing the breakpoint, move the breakpoint up. Simply doing this enough times will tell you where in your code the offending statement is. Then you can do another google search or post here for further help armed with more specific info!

Privacy & Terms