miz
I want to load in some data from a csv for a minigame.
I have code that will do it using std libraries:
std::ifstream file2("instructions.csv");
for (int row = 0; row < 10; ++row)
{
std::string line;
std::getline(file2, line);
if (!file2.good())
break;
std::stringstream iss(line);
for (int col = 0; col < 10; ++col)
{
std::string val;
std::getline(iss, val, ',');
if (!iss.good())
break;
instructionSet[row][col] = val.c_str();
}
}
Can I do the same thing with the Urho3d File Class?
I want to use GetSubsystem()->GetFile() so I can get the csv from within a package file I’ve added to the resource cache.
How can I do this?