rtnMichael
Programmer
hey, can someone tell me why I'm printing out more than the size of the array after I fread into it. Here's what I'm doing:
char strttimestamp[12];
if (!(GetTimeStamp(strttimestamp, sizeof(strttimestamp))))
//sub
GetTimeStamp(timestamp, size)
char timestamp[12];
int size;
{
...
fread(timestamp, 1, size, strttimestamp_fp)
...
}
and this is what it prints out:
101597184028!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I've tried a number of things, and I'm losing confidence in my programming skills...
Thanks
M
char strttimestamp[12];
if (!(GetTimeStamp(strttimestamp, sizeof(strttimestamp))))
//sub
GetTimeStamp(timestamp, size)
char timestamp[12];
int size;
{
...
fread(timestamp, 1, size, strttimestamp_fp)
...
}
and this is what it prints out:
101597184028!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I've tried a number of things, and I'm losing confidence in my programming skills...
Thanks
M