Here is my code
Code: Select all
void AlarmManager::Save()
{
ofstream writefile;
list<Alarm*> alarms;
u64 *CurTick = NULL;
pspTime CurTime;
list<Alarm*>::iterator iter;
writefile.open("data/file/Alarms.dat");
for (iter = Alarms.begin(); iter != Alarms.end(); iter++)
{
CurTime = (*iter)->GetTime();
sceRtcGetTick(&CurTime, CurTick);
writefile << (*iter)->GetRepeat() << "|" << (*iter)->GetSound().size() << "|" << (*iter)->GetSound()
<< "|" << (*iter)->GetAllowSnooze() << "|" << (*iter)->GetLabel().size() << "|" << (*iter)->GetLabel()
<< "|" << CurTick << "|" << (*iter)->GetTime().day << endl;
alarms.push_back(*iter);
}
writefile.close();
}
Cheers!!!
Nevermind, found it
Code: Select all
void AlarmManager::Save()
{
ofstream writefile;
list<Alarm*> alarms;
[b]u64 CurTick;[/b]
pspTime CurTime;
list<Alarm*>::iterator iter;
writefile.open("data/file/Alarms.dat");
for (iter = Alarms.begin(); iter != Alarms.end(); iter++)
{
CurTime = (*iter)->GetTime();
sceRtcGetTick(&CurTime, [b]&CurTick[/b]);
writefile << (*iter)->GetRepeat() << "|" << (*iter)->GetSound().size() << "|" << (*iter)->GetSound()
<< "|" << (*iter)->GetAllowSnooze() << "|" << (*iter)->GetLabel().size() << "|" << (*iter)->GetLabel()
<< "|" << CurTick << "|" << (*iter)->GetTime().day << endl;
alarms.push_back(*iter);
}
writefile.close();
}