8 תשובות
רוצה לנסות לשלוח לי מה רשמת?
שואל השאלה:
#include <string.h>
#include <stdio.h>
#include "dirent.h"

file* checkfile = null;
file* virussignature = null;
dir* d = null;
struct dirent* dir;

#define buffer 512

void test(char* name, char* directoryname, char* filename);

int main(int argc, char** argv)
{
char virus[buffer] = { 0 };
char file[buffer] = { 0 };
char filename[100] = { 0 };

d = opendir(argv[1]);
virussignature = fopen(argv[2], "rb");
if (virussignature != null)
{
fread(virus, sizeof virus, 1, virussignature);
}
if (d != null)
{
while ((dir = readdir(d)) != null)
{
if (strcmp(dir->d_name, ".") && strcmp(dir->d_name, ".."))
{
test(dir->d_name, argv[1], filename);
printf("%s\n", filename);
checkfile = fopen(filename, "r");
filename[0] = '\0';
printf("%s\n", dir->d_name);
if (checkfile != null)
{
fread(file, sizeof file, 1, checkfile);
}
}
}
}
closedir(d);
fclose(virussignature);
fclose(checkfile);
getchar();
return 0;
}

void test(char* name, char* directoryname, char* filename)
{
strcat(filename, directoryname);
strcat(filename, "/");
strcat(filename, name);

}
זה ממגשימים?
אנונימי
שואל השאלה:
כן זה מגשימים
אני בדיוק עושה את זה גם
אנונימי
שואל השאלה:
אז אם תצליח איכשהו בבקשה תשלח לי ניסיתי כבר מלא דברים ומלא זמן ולא הצלחתי
עשיתי את זה שנה שעברה, ממש לא זוכר מה עשיתי ואין לי את זה במחשב עוד בדקתי סליחה
ואו בבקשה תגיד לי שהצלחת אני בדיוק בתחילת העבודה על הפרוייקט הזה ואין לי כל כך כיוון, יש מצב שאולי תסביר על זה קצת? יותר טוב אם תפתח צ'אט פרטי (ניסיתי אבל מסתבר שצריך משהו שנקרא פרחים בשביל לשלוח הודעה)