Hi, I have some code to read a single line from a file:
if(agk::GetFileExists("data.txt") == 1)
{
unsigned int file = agk::OpenToRead("data.txt");
char* buf = agk::ReadString(file);
std::string str(buf);
//highScore = agk::ReadInteger(file);
agk::CloseFile(file);
delete[] buf;
}
It is giving me garbage on my windows 8.1 machine while it seems to work fine on my windows 8.0 ultrabook, both using agk 108.21.
If anyone has windows 8.1 with a tier 2 project could you confirm that the command does not work? Or maybe it does, it could be something I'm doing wrong, thanks.
EDIT:
I don't think it's agk, the following code also returns garbage:
std::string str;
std::ifstream file;
file.open("data.dat");
if(file.is_open())
{
std::getline(file, str);
file.close();
bool stop = true;
}
Perhaps I need a break, I must be doing something wrong earlier in my code or something.