Добавил:
Studfiles2
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Тестовые примеры / ch7 / test_touch
.C /* Emulate the UNIX touch program */
#include <iostream.h>
#include <stdio.h>
#include <sys/types.h>
#include <utime.h>
#include <time.h>
int main (int argc, char* argv[])
{
struct utimbuf times;
times.actime = times.modtime = time(0);
while (--argc > 0) /* touch each named file */
if (utime (*++argv, ×)) perror("utime");
return 0;
}
#include <iostream.h>
#include <stdio.h>
#include <sys/types.h>
#include <utime.h>
#include <time.h>
int main (int argc, char* argv[])
{
struct utimbuf times;
times.actime = times.modtime = time(0);
while (--argc > 0) /* touch each named file */
if (utime (*++argv, ×)) perror("utime");
return 0;
}
Соседние файлы в папке ch7