Unreal course Section 2 Bulls and Cows Warning error C4267

Ok so here goes, first off I am new to C++ although I do have a C# background, so bear with me. I added the bulls and cows project to team explorer so that I could access the project at home. I opened the project and home and when I built and ran I got two warnings:

C4267: ‘return’ : conversion from ‘size_t’ to ‘int32’, possible loss of data File: FBullCowGame.cpp Line: 10
C4267: ‘initializing’ : conversion from ‘size_t’ to ‘int32’, possible loss of data File: FBullCowGame.cpp Line: 51

I’m curious as to why this warning occurred at home and not at work. MSDN was no help either. Could somebody please explain this to me?

OK I figured it out, I think. I changed the statement:

using int32 = int;
to
using int32 = size_t;

That got rid of the warning.

Privacy & Terms