dimanche 7 janvier 2018

reading in file and storing it to variables, then checking using if Statement. Using ifstream

Okay, so I'm trying to read that from a text file and storing it to variables. I then want to check if(variable i == x). However, when I do the variable I does not equal x, even though I have stepped through the debugger and it does! any idea? The variables are char type.

        while (inFile >> type >> xpos >> ypos >> zpos >> scale)
    {
        if (type == "Floortile")
        {

            Model* floor = new Model(g_pD3DDevice, g_pImmediateContext);
            if (FAILED(floor->LoadObjModel("assets/Model/Floor_tile.obj", "assets/Textures/Groundtex.bmp")))
            {
                DXTRACE_MSG("Failed to load model");
            }
}

Aucun commentaire:

Enregistrer un commentaire