I do not understand - what is the error?
Code:
const char MFName_r[] = "1223_r"; // Название файла для File Mapping для чтения const char MFName_w[] = "1223_w"; // Название файла для File Mapping для чтения // Структуры struct FMP_struct{ HANDLE readfile; HANDLE writefile; int* read; int* write; } FMP; ///////////////////////////////////////////////////////////////////// // // // Работа с File Mapping // // ///////////////////////////////////////////////////////////////////// // Создание Map файла void LetMeMapFlie(){ // Создаем файлы FMP.writefile = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, 255, MFName_w); FMP.readfile = CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READONLY, 0, 255, MFName_r); // Открываем файлы FMP.write = (int*)MapViewOfFile(FMP.writefile, FILE_MAP_WRITE, 0,0,0); FMP.read = (int*)MapViewOfFile(FMP.readfile, FILE_MAP_READ, 0,0,0); } // Считать CHAR из MAP unsigned char ReadChar_SlimRG(){ return (char)FMP.read[0]; } // Считать INT из MAP int ReadInt_SlimRG(){ return (int)FMP.read[0]; } // Записать INT в MAP void WriteInt_SlimRG(int key){ FMP.writefile[0] = (int)key; } // Записать CHAR в MAP void WriteChar_SlimRG(unsigned char key){ FMP.writefile[0]) = (int)key; } Writes - subscript of pointer to incomplete type 'void'
And highlights:
void WriteInt_SlimRG(int key){ FMP.writefile[0] = key; } and
void WriteChar_SlimRG(unsigned char key){ FMP.writefile[0]) = (int)key; } 