Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mkristain

macrumors regular
Original poster
Aug 18, 2011
115
0
this error occurred here

Code:
struct tm		*tm_p;
      tm_p = localtime(&current_file->stat.st_mtime);

      snprintf(datestr, sizeof(datestr),"%2d-%s-%4d %02d:%02d",
	  tm_p->tm_mday, monstr[tm_p->tm_mon], 
	  1900 + tm_p->tm_year, tm_p->tm_hour,
	  tm_p->tm_min);

please help me to resolve this.
 

foidulus

macrumors 6502a
Jan 15, 2007
904
1
this error occurred here

Code:
struct tm		*tm_p;
      tm_p = localtime(&current_file->stat.st_mtime);

      snprintf(datestr, sizeof(datestr),"%2d-%s-%4d %02d:%02d",
	  tm_p->tm_mday, monstr[tm_p->tm_mon], 
	  1900 + tm_p->tm_year, tm_p->tm_hour,
	  tm_p->tm_min);

please help me to resolve this.


Are you including time.h?

#include <time.h>

if not, you will get that error.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.