расставь источники по алфавиту 1. Metanit.com. Введение в WPF [Электронный ресурс]. URL:…
- User
расставь источники по алфавиту
- Metanit.com. Введение в WPF [Электронный ресурс]. URL: https://metanit.com/sharp/wpf/1.php (дата обращения: 28.02.2024). Яз. рус.
- Metanit.com. АВЛ-деревья [Электронный ресурс]. URL: https://www.niisi.ru/iont/projects/rfbr/90308/90308_miphi6.php - :~:text (дата обращения: 28.02.2024). Яз. рус.
- Metanit.com. Паттерн MVVM [Электронный ресурс]. URL: https://metanit.com/sharp/wpf/22.1.php (дата обращения: 15.04.2024). Яз. рус.
- Учебник. Создание приложения WPF с помощью .NET [Электронный ресурс]. URL: https://learn.microsoft.com/ru-ru/dotnet/desktop/wpf/get-started/create-app-visual-studio?view=netdesktop-8.0 (дата обращения: 20.03.2024). Яз. рус.
- Metanit.com. XAML [Электронный ресурс]. URL: https://metanit.com/sharp/wpf/1.php (дата обращения: 20.03.2024). Яз. рус.
- АВЛ-деревья URL: https://habr.com/ru/articles/150732/ (дата обращения: 10.02.2024). Яз. рус.
- Введение в ReactiveUI: прокачиваем свойства во ViewModel URL:https://habr.com/ru/articles/303650/ (дата обращения: 01.05.2024). Яз. рус.
- Балансировка [Электронный ресурс]. URL: https://fkti5301.github.io/exam_tickets_aisd_2017_kolinko/tickets/11.html (дата обращения: 10.02.2024). Яз. рус.
- Алгоритмы на деревьях [Электронный ресурс]. URL: https://ru.hexlet.io/courses/algorithms-trees/lessons/balancing/theory_unit (дата обращения: 10.02.2024). Яз. рус.
- АВЛ-дерево [Электронный ресурс]. URL: https://blog.skillfactory.ru/glossary/avl-derevo/ (дата обращения: 10.02.2024). Яз. рус.
- Assistant
Источники отсортированные по алфавиту:
- АВЛ-дерево [Электронный ресурс]. URL: https://blog.skillfactory.ru/glossary/avl-derevo/ (дата обращения: 10.02.2024). Яз. рус.
- АВЛ-деревья URL: https://habr.com/ru/articles/150732/ (дата обращения: 10.02.2024). Яз. рус.
- Алгоритмы на деревьях [Электронный ресурс]. URL: https://ru.hexlet.io/courses/algorithms-trees/lessons/balancing/theory_unit (дата обращения: 10.02.2024). Яз. рус.
- User
15-16-5.c:43:23: warning: passing 'int *' to parameter of type 'socklen_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign] &clilen)) < 0) { ^~~~~~~ /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/socket.h:736:27: note: passing argument to parameter here socklen_t * __restrict) __DARWIN_ALIAS_C(recvfrom); ^ 1 warning generated.
/* A simple echo UNIX Domain datagram server / #include <sys/socket.h> #include <sys/types.h> #include <sys/un.h> / Новый include-файл вместо netinet/in.h и arpa/inet.h */ #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h>
int main() { int sockfd; int clilen, n; char line[1000]; struct sockaddr_un servaddr, cliaddr; /* новый тип данных под адреса сокетов Изменен тип семейства протоколов Изменен тип семейства протоколов и имя поля в структуре Локальный адрес сокета сервера – BBBB – в текущей директории */ if (bind(sockfd, (struct sockaddr Изменено вычисление фактической длины адреса Изменено вычисление максимальной длины для адреса клиента */ if ((n = recvfrom(sockfd, line, 999, 0, (struct sockaddr *)&cliaddr, &clilen)) < 0) { perror(NULL); close(sockfd); exit(1); } if (sendto(sockfd, line, strlen(line), 0, (struct sockaddr *)&cliaddr, clilen) < 0) { perror(NULL); close(sockfd); exit(1); } } return 0; }
- Assistant
The warning you encountered is due to passing a pointer to an
int(&clilen) where a pointer tosocklen_t(which is typedef'ed asunsigned inton your platform) is expected. This can lead to issues becauseintandunsigned intmight have different representations, particularly concerning their handling of sign (positive/negative values). - User
15-16-5.c:24:31: error: unexpected character <U+201C> strcpy(servaddr.sun_path, “BBBB”); ^ 15-16-5.c:24:38: error: character <U+201D> not allowed in an identifier strcpy(servaddr.sun_path, “BBBB”); ^ 15-16-5.c:24:34: error: use of undeclared identifier 'BBBB”' strcpy(servaddr.sun_path, “BBBB”); ^ 3 errors generated.
- Assistant
The errors you're seeing are due to the use of “curly” quotation marks (
“and”) instead of the standard straight double quotes (") around the string"BBBB". In C programming, string literals must be enclosed in straight double quotes. The curly quotation marks are typically used in word processing software and are not recognized by C compilers.Here's the corrected line of code:
strcpy(servaddr.sun_path, "BBBB");Replace the curly quotes with straight quotes in the provided line within your source code. This should resolve the errors related to the string literal and undeclared identifier.