Tôi đang sử dụng C++ và XCode để tạo ra một ứng dụng dòng cmd để lưu file cho phép, tuy nhiên tôi không thể có được phương pháp tinh trùng() được xác định, lỗi này làXCode C++ thiếu tinh trùng()
'Sử dụng khai báo định danh 'tinh trùng'
của tôi bao gồm và các đoạn mã trong câu hỏi dưới ...
// 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");
Tôi sẽ Google cho "tinh trùng người đàn ông" ... –
Vui lòng xác định không hoạt động. Ans những gì một tên chức năng wow! – Iznogood
@OliCharlesworth: Tôi nghĩ rằng tôi sẽ ngại khi nhấp vào bất kỳ trận đấu nào, đặc biệt là tại nơi làm việc! –