What seems to be the problem here!!
Code:
#include <stdio.h>
#include <windows.h>
// *****************************************************************
// This portion checks to see if you are in the right directory
// If Year is non-existant then new Year folder is created
// If Day is non-existant then new Day is created within year
// Dates are taken from GPS Conversion portion
// *****************************************************************
void main()
{
int year, day, hour, PRN, prev_year, prev_hour;
year = 2100; ////////////////////////////////////////////////////////////////////////////////
day = 100; ////////////////////////////////////////////////////////////////////////////////
hour = 20; //////////////////////JUST FOR TESTING PURPOSES/////////////////////////////////
PRN = 122; ////////////////////////////////////////////////////////////////////////////////
prev_year = 1999; ////////////////////////////////////////////////////////////////////////////////
prev_hour = 19; ////////////////////////////////////////////////////////////////////////////////
char string_variable [200];
(prev_year = year - 1);
(prev_hour = hour - 1);
if (year == prev_year + 1)
{ sprintf(string_variable, "c:\\temp\\PRN%3d\\Y%4d\\d%3d\\h%2d.ems", PRN, year, day, hour);
}
else (sprintf(string_variable, "c:\\temp\\PRN%3d\\Y%4d\\d%3d\\h%2d.ems", PRN, year, day, hour) == NULL);
if (hour == prev_hour + 1)
{ sprintf(string_variable, "c:\\temp\\PRN%3d\\Y%4d\\d%3d\\h%2d.ems", PRN, year, day, hour);
}
else (sprintf(string_variable, "c:\\temp\\PRN%3d\\Y%4d\\d%3d\\h%2d.ems", PRN, year, day, hour) == NULL);
}
//***********************************
//End of Folder checking section
//***********************************
the code executes but no files or folders are produced :-(