I want to write a log in feature in C++. I've written the code, but when I tried to compile it it just crashed. So I started some debugging and got the following error: Exception triggered at 0x7A055378 (vcruntime140d.dll) in Einkaufsladen.exe: 0xC0000005: Access violation when reading at position 0xDDDDDDDD.
for (int i = menge; i >= 0; i--)
{
if ( gesamtmenge[k].Name == gesamtmenge[i].Name ) // here I get the error
{
if (gesamtmenge[k].Passwort == gesamtmenge[i].Passwort)
{
return true;
i = -1;
}
}
else
{
return false;
}
}
f.close();
This of course isn't the whole code but it hould be the necessary part. If anything more is needed just say so.
I'm greatful for any help.
User contributions licensed under CC BY-SA 3.0