Questions tagged as 'c'

1
answer

Problem removing the first node from the double-chained list

Good evening, I am trying to solve an issue that asked to remove students whose CR is less than 5. My biggest problem is to remove the first node (first student) from a double-chained list when there is only one node. I just gave free on the...
asked by 04.09.2017 / 01:50
0
answers

Vector in OpenGL

Hello, I'm venturing into OpenGL and so far I know the basics of creating figures. I need to create a number of bars ranging from 1 to 64, the problem is that I need to do this with a FOR. When the first for counter starts, it creates the first...
asked by 01.09.2017 / 18:05
1
answer

Chained list prints in addition to what is inserted

I have this function verticeobj* loadverticeObj(char *fname,verticeobj *vo){ FILE *fp; int read; float x, y, z; char ch; fp=fopen(fname,"r"); if (!fp) { printf("can't open file %s\n", fname); exit(1...
asked by 15.09.2017 / 19:10
1
answer

Warning on battery pointers

I'm trying to do a simple stack implementation, however the message appears:    warning: initialization from incompatible pointer type   -Wincompatible-pointer-types This warning appears on both line 20 and line 29. These pointers a...
asked by 15.09.2017 / 19:01
1
answer

Relocate Size of my structure in C?

typedef struct tempNo { int valor; int coluna; struct tempNo* prox; } NO; typedef NO* PONT; typedef struct { PONT* A; int linhas; int colunas; } MATRIZ; void inicializaMatriz(MATRIZ* m, int linnha, int coluna) {...
asked by 16.09.2017 / 17:53
0
answers

Make file and compile in terminal

I need my makefile to run on the terminal so that it is not necessary to insert $ time make run , but only make run , and that it shows the execution time in the same way. Can anyone help me please? Make code: NAME=TP1_mai...
asked by 07.09.2017 / 21:50
1
answer

Vector product in C with .dat file entry

Be the code below, where the input file vecores.dat, in each line, has 6 numbers where the first 3 are components of an "u" vector and the last 3 are components of a "v" vector. output file vector.dat should have 3 components in each vector prod...
asked by 07.09.2017 / 19:25
0
answers

Program goes into unwanted looping - Arduino

The following code should, when a button is pressed, execute the commands once. If the user holds the button pressed, the code must also be executed only once, as if it were just a pulse on the button. When you release the button, the system sho...
asked by 09.09.2017 / 22:46
0
answers

Working with cents in C [duplicate]

In the code below I can receive values in the no cents salary fields (example: 1,800), but if I put (1,800.20) it displays error. Detail I am using setlocale(LC_ALL,"Portuguese"); . printf("\nAntepenúltimo salário: "); scanf("%f", &...
asked by 09.09.2017 / 04:30
1
answer

How do I make a program in C generate an executable binary? [closed]

Hello, I wanted to know how I can for a program in C to generate another executable binary eg: binary elf x-elf.bin when executed creates another executable binary y-elf.bin     
asked by 23.08.2017 / 05:44