Questions tagged as 'c'

0
answers

I read 576.73 however it is displayed as 576.729980! [duplicate]

Problem The source code is only to return the amount of banknotes and coins based on an input value. However, I'm having trouble manipulating the value of the aux variable. In the example shown, the input value is 576.73 . But,...
asked by 24.03.2018 / 19:31
1
answer

How to dynamically allocate an array using a pointer pointer in a void function

I'm trying to allocate an array in a void function, by sending a pointer pointer int **sigma , as lerArquivo(char *alfabeto, int *Q, int *Q0, int *F, int ***sigma, FILE *arq); , but I'm having difficulty allocating memory spac...
asked by 17.03.2018 / 16:57
0
answers

How to create log file with RFID sensor and DS1307 for PIC

I am doing a design of a dot-register that will use an SD card module (MMC), RFID Sensor MFRC-522 and a Real Time Clock (DS1307). These are just the main components, there is still the keyboard that will serve the menu that is in finalization. I...
asked by 14.03.2018 / 18:13
0
answers

I can not count on a decision

I made the solution to the question Uri, Tourists of the Huacachina 27008 park , but the results are the same as those of the question however my solution fails in 20% of the tests and I do not know how to solve #include <stdio.h> #incl...
asked by 07.03.2018 / 15:08
0
answers

Write contents of .txt file to C / C ++ vector

How do I get the values from a .txt file and put in a vector name, phone and email and sort them by name. I can not use struct . #include <stdio.h> #include <string.h> #include <stdlib.h> #include <lo...
asked by 05.03.2018 / 20:00
0
answers

List and Pointers in C

I'm trying to create a static list, and I can not display the product name in the printf("\n Indice: %d Valor: %s",i,p->nomeProduto[i].valor); list, only the "ListList", the query function probably does not work. Here is the whole c...
asked by 05.03.2018 / 18:52
0
answers

Sort a pointer inside a struct

In this chained list, a vector of 10 positions is set. First, you must choose which position to complete and then how many values to add (% with%). So far so good. The problem is that I'm trying to sort the vectors incrementally, but I'm d...
asked by 11.03.2018 / 00:21
0
answers

Binary files in C language

I'm developing a job in college, a system of cars, I'm having doubts on a specific function LoadLista , here's the description of what it should do: "Load the file" cars.bin "in BINARY READING mode of the folder. The first element of th...
asked by 26.02.2018 / 06:02
1
answer

Problems with "libpq.so.5": wrong ELF class: ELFCLASS64 in C

I'm trying to run a compiled file in c and I get the following error message: "error while loading shared libraries: libpq.so.5: wrong ELF class: ELFCLASS64" I did a search and I identified that this type of error is due to the x64 and x86...
asked by 28.02.2018 / 15:27
1
answer

Checking string within a function in C

Greetings! I am creating a C program where the user can change the state of a sensor entering the sensor name and 1 or 0 to change its status, 1 for on and 0 for off. However, when I try to check this condition out of the main, in a function is...
asked by 24.02.2018 / 23:13