'initializing': conversion from 'size_t' to 'int32', possible loss of data

Hi there,

So I was following till this lecture and it’s my first issue I can’t figure out on my own. So basically, my code is same as Ben’s, I even pulled Ben’s source code for this particular lecture from github, gives the same error (pic below). Any thoughts guys ? One more thing, VS does launch the console, however as soon as I input any data it kicks with an error.

If you provide the code in your .cpp file, it will be a lot easier to help you uncover the cause of the problem. I would guess it is related to your for loops on line 40 or 43 - the error is likely that you’re trying to read n+1, where n is the last possible value.

Might be brain farting here as i havent got this project on my disk anymore but are you supposed to have it in debug mode on visual studio or did you do that to try and locate a crash prior to this?
If you look right above the bullcowgame.cpp in the screenshot it should say development editor there.

I am going to assume that its deliberatly in the debug mode as the error is normally caused by incorrectly calling something from the game engine itself. For example calling to a list that has 10 enteries but you want entry 15.
Although if you copied Bens code exactly then its more likely that debug tab.

Privacy & Terms