Socket* Socket::accept() { /* ГДЕ то тут инициализирую this->address = str_addr; // 127.0.0.1 */ return new Socket(client_sock_id); } // ВЫЗЫВАЮ ЗДЕСЬ Socket *c = s.accept(); // с->getAddress()// выходят русские буквы МММ....-штук под 100 или больше
надеюсь что я что-то не правильно делаю.
В моём случае recv взращает -1, что говорит о том что произошла ошибка, какая и почему?.
errno
, perror
, вот это всё.while(int s1 = accept(sock, 0, 0)) //принимаем соединения для работы с ними { int k = recv(sock, &buff, sizeof(buff), MSG_NOSIGNAL);
s1
, а recv
читает из sock
. Как сохранять файл в процессе запущенном из другого процесса?
в итоге все выполняется отлично в консоль выводится все верно, но файл не создается.
Нужен ли ASSEMBLER специалисту по информационной безопасности?
...
В интернете все разделились на 2 лагеря: одни говорят, что он устарел и на замену ему пришли высокоуровневые языки программирования...
Два пользователя одновременно, с точностью до миллисекунд, сделали одно и то же действие — нажали кнопку отправки данных. Что произойдет — запишутся данные в файл или нет и почему?
float b; ... if (b == b)
Two values (other
than NaNs) with the same object representation compare equal, but values that compare
equal may have different object representations.
. Пишу приложение на C++...
как брать, при вызове программы с помощью контекстного меню, полный путь откуда вызывается эта программа ("--cd=%v.")
линк на osdev.org не кидайте, я как раз там и читал.
Two 32-bit I/O locations are used, the first location (0xCF8) is named CONFIG_ADDRESS, and the second (0xCFC) is called CONFIG_DATA. CONFIG_ADDRESS specifies the configuration address that is required to be accesses, while accesses to CONFIG_DATA will actually generate the configuration access and will transfer the data to or from the CONFIG_DATA register.
Как это усовершенствовать?
An optional 'm' character. This is used with string conversions (%s, %c, %[), and relieves the caller of the need to allocate a corresponding buffer to hold the input: instead, scanf() allocates a buffer of sufficient size, and assigns the address of this buffer to the corresponding pointer argument, which should be a pointer to a char * variable (this variable does not need to be initialized before the call). The caller should subsequently free(3) this buffer when it is no longer required.
#include <stdio.h>
int main()
{
char *chars;
scanf("%m[^\n]",&chars);
printf("%s\n", chars);
}
`*198*` ... 8.0 Fanny och Alexander (1982).mp4: command not found
в чем проблема
Как можно перенести?
find -name '*198*' -print0 | xargs -0 -I{} mv \{} /home/fywy/task1/video/80x