Questions tagged as 'c'

0
answers

Recursion - Why am I entering a loop?

I'm trying to implement an algorithm called minimax, but I'm having trouble recursively, it goes into a loop which I can not figure out why. The depth of the algorithm should vary according to the moves that are tested, but the depth that occurs...
asked by 08.06.2018 / 05:11
0
answers

Binary Tree with 3 hands have special treatment?

I am putting together a hospital program and the order of the patients will be by a binary tree, taking into account a degree of urgency existing in the patient struct, as I show below. My question is: Do you have any special treatment for 3 han...
asked by 05.06.2018 / 04:06
1
answer

Problem with socket C

Good afternoon everyone! I am doing an academic work on Sockets in Language C, in which I need to create an MP3 file transfer program in Windows. In it I have two programs, client and tracker, in which to follow the operation: Client queries...
asked by 01.06.2018 / 19:26
0
answers

Graph represented as list linked to list

I'm trying to implement a graph with list structure attached to the list by pulling the data from a txt file (input.txt). A 100 2 B 3 D 4 B 150 2 C 3 E 2 C 150 1 F 2 D 150 1 E 4 E 100 1 F 1 F 200 0 The idea is that when reading the file a f...
asked by 25.06.2018 / 05:17
0
answers

Sockets Array in C

I'm studying in C and I'm creating a program that exchanges messages between pc's in the client / server style. I created an array of sockets and put them in threads. int main () { pthread_t *servidor = malloc(sizeof(int*)*2); pthre...
asked by 24.06.2018 / 23:22
0
answers

Vector of pointers in which each element is a row

Hello. I wanted to create a vector of pointers in which each element points to a supposed queue, but when I try to access the (vector of pointers) - > (TAD row) - > (vector within the TAD queue), I have problems, it does not access. Fol...
asked by 28.05.2018 / 01:27
0
answers

Name of a file redirecting the default entry in C

How to store a variable in the name of a file when redirect standard input, without using argv . Sample execution:    ./ a.out < filename.txt     
asked by 27.05.2018 / 17:40
0
answers

NodeMCU does not receive data as I send via UDP Protocol

I'm developing a simple application, the goal is to simply send the reading of a sensor connected to an Arduino NodeMCU to a Raspberry PI, and perform a similar reading using Raspberry and send to the NodeMCU. Basically, both are inside the s...
asked by 10.06.2018 / 01:44
1
answer

Calculate Factorial Array using Thread's

I'm having trouble in the following exercise    Write a program that, given a vector with the first 5 numbers   cousins, throw 5 threads. Each of them will calculate the value of the   factorial of one of the positions of the vector and   cal...
asked by 29.04.2018 / 12:22
2
answers

How to stop receiving keyboard digits?

This is a game of memory and while the numbers are being displayed I want the user can not type. **for (i=0;i<2;i++) //Exibe os números que estão no vetor numeros[] { printf ("%d\t...
asked by 07.05.2018 / 17:54