Questions tagged as 'c'

0
answers

How do I define a listStore to render a progress bar in gtk2?

I'm looking for an example to create a listStore (to use in a treeView) that can contain a field of type progress bar. I'm writing in C (not in c ++) and using gtk2 in my code: store=gtk_liststore_new(3,G_TYPE_STRING,G_TYPE_INT, G_TYPE?...
asked by 30.03.2017 / 00:29
1
answer

Convert from decimal to binary in C

I'm making a C code for a college job with the goal of converting a decimal number to binary. But when the program runs, it always prints 00000000, no matter what number I put. Could anyone tell you what the mistake is? Here is the code: #incl...
asked by 21.04.2017 / 15:54
2
answers

File reading problems

Last week I did a question about reading a "giant" string . Thanks to the help of the staff here I was able to implement the function. Now, I've come up with a new problem. The file reading is not running correctly. The program is not readin...
asked by 18.09.2017 / 02:14
0
answers

Serial Communication Error ttyS0

I am using a TTL serial communication via the terminal with an Orange Pi One and a PIC16F628A. The program that is in the microcontroller is simple: if it receives the character '1' puts a bit in high logic level, thus turning on the LED and rec...
asked by 17.04.2017 / 21:04
1
answer

Printf being executed twice during a loop

I am creating a prototype of the gallows game. I do not understand much of programming and I have a problem with what is returned. The part of the code that is giving problem and that is below returns me twice the "Type a letter:". Can anyone te...
asked by 22.11.2016 / 00:57
4
answers

Mathematical division needs

On the Windows calculator: 9 / 3,0001 = 2,999 ... In my program: 9 / 3,0001 = 3; I would like to get this level of precision using C. See excerpts from my program: double op(double num1, double num2, char c) { if(c == '/')...
asked by 25.10.2014 / 18:23
1
answer

How to remove and rename directories in C language?

To create a directory I used the function mkdir (const char *) and to remove I tried to use remove (const char *) as below: void remove_diretorio() { char nome_pasta[10]; printf("Informe o nome da pasta: "); fflush(stdin); gets(nome_pasta)...
asked by 17.06.2017 / 00:45
0
answers

Print list simply chained up in C [closed]

I have a list that is simply chained where each node has a value, being 1, 2, 3, 4 and 5 respectively. I want to print the list values only for aesthetic reasons like 5, 4, 3, 2, 1 without creating another list. How can I do this? I'm out of ide...
asked by 05.05.2017 / 03:34
0
answers

ARDUINO Writing data to SD card through ethernet shield [closed]

Good evening I want to make the arduino un write data to an SD card I do not have the SD card module for Arduino ButIhavetheethernetshieldmodule,whichhasanSDcardslot Is it possible to use the ethernet shield to write data to the SD c...
asked by 19.10.2016 / 22:18
0
answers

How to change the UUID of a partition via C code? [closed]

I am doing a program in C, and for Linux, I have been able to easily "catch" the UUID with the command blkid . This program needs to know if the disk where it was installed is still the same and allow to change the UUID itself. Is it...
asked by 11.09.2016 / 09:27