Can i ask some basic progamming questions?
The following code is the file stream created during the launching
application. For the 1st launching, a current date will be written to a
file. For the following launching, the current date will be compared with
the previous date through the file created.
LocalID lid;
lid = DmFindDatabase(0, "Date.txt");
DateType date;
GetDate(&date);
g_sCurrentDate.day = date.day;
g_sCurrentDate.month = date.month;
g_sCurrentDate.year = date.year + 1904;
if (lid == 0)
{
fileHandle = FileOpen (0, "Date.txt", 0,0, fileModeReadWrite, &error);
FileWrite(fileHandle, &date1, dateStringLength, 1, &error );
FileClose(fileHandle);
}
if (lid != 0)
{
fileHandle = FileOpen (0, "Date.txt", 0,0, fileModeReadWrite, &error);
FileRewind(fileHandle);
FileRead (fileHandle, &date2, dateStringLength, 1,&error1);
if (&date2==&date1) ==> Can i compare like this way, but it
seems doesn't work...
{
---
}
FileClose(fileHandle);
}
Can anybody advise me?? Thank you in advance for the help!!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/