PNG Datein funktionieren nicht mehr nach dem entpacken

Ich hab mir grad eine Funktion geschrieben um nur aus der Datei zu lesen aber irgendwie bleibt er hängen beim finden der Datei an der PNG Datei.

C++:
MWPack::MWPack(std::string Pack, std::string File)
{
    this->_Pack = Pack;
    this->_File = File;
    this->_eof = false;
    this->_Load.open(this->_Pack.c_str());
    while (true)
    {
        std::getline(this->_Load, this->_Buffer);
        cout << this->_Buffer;
        if (this->_Buffer == this->_File)
        {
            std::getline(this->_Load, this->_Buffer);
            cout << " found..." << endl;
            if (this->_Buffer == "(%?{?%)")
            {
                return;
            }
            cout << " failed..." << endl;
        }
    }
}
void MWPack::Set(std::string Pack, std::string File)
{
    this->_Pack = Pack;
    this->_File = File;
}
std::string MWPack::Load()
{
    std::string DefaultBuffer = "";
    this->_Load >> this->_Buffer;
    if (this->_Buffer == "(%?}?%)")
    {
        this->_eof = true;
        return DefaultBuffer;
    }
    else
    {
        return this->_Buffer;
    }
}
int MWPack::LoadINT()
{
    int _BufferINT;
    this->_Load >> _BufferINT;
    return _BufferINT;
}
bool MWPack::eof()
{
    return this->_eof;
}

Hat sich erledigt.
 
Zuletzt bearbeitet von einem Moderator:

Neue Beiträge

Zurück