Я использую C++ и XCode, чтобы создать приложение CMD строки, чтобы сохранить права доступа к файлам, однако я не могу получить метод спермы(), чтобы определить, ошибкаXCode C++ отсутствует сперма()
«Использование необъявленный идентификатор„спермой“
Мои включает в себя и кусок кода в вопросе ниже ...
// My includes ...
#include <iostream>
#include <stdio.h>
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <vector>
#include <sys/stat.h>
#include <dirent.h>
#include <pwd.h>
#include <grp.h>
#include <time.h>
#include <locale.h>
#include <langinfo.h>
#include <stdint.h>
// Code fragment ...
dp = opendir ("/var/someplace");
if (dp != NULL)
{
while ((ep = readdir (dp)))
{
oFile = new FileObject;
oFile->setName(ep->d_name);
oFile->setIsDirectory(ep->d_type == isFolder);
oFiles.push_back (*oFile);
// If it's a folder then we can get it's innards
if (stat(ep->d_name, &statbuf) == -1)
continue;
cout << "%10.10s", sperm(statbuf.st_mode);
iFile++;
}
closedir (dp);
}
else
perror ("Couldn't open the directory");
Я бы Google для «спермы человека» ... –
Пожалуйста, определите, не работает. Ans, какое имя функции wow! – Iznogood
@OliCharlesworth: Думаю, я боюсь нажать на любой из матчей, особенно на работе! –