Questions tagged as 'c'

1
answer

Problem with Segmentation Fault

I am creating a program that simulates a minefield, and option number 1 should pick up a matrix (containing points (where it has no pump) and asterisks (where it has a bomb) from a computer file and copy it to a array that I'm dynamically alloca...
asked by 08.08.2015 / 22:23
1
answer

No / Executable error

Good afternoon, I'm having this error when compiling the program:    Aborted Aborted My program copies from a file to a dynamically allocated array using realloc because I do not know the size of rows and columns of the array inside...
asked by 09.08.2015 / 19:41
1
answer

Error segmentation fault

And having a problem with my function, I'm getting her address and I'm going through it, where it's a capital I convert to minuscule and where I have a point, an exclamation mark, a colon, a colon and a semicolon, / p> But according to valgri...
asked by 10.06.2015 / 21:59
0
answers

How to test if a function is already defined in the IAR? (W)

Hello, I'm making a library that should be easily portable to other programs. So I tried to do the following: 01 #ifndef delay_ms 02 #define delay_ms(X) OSTimeDlyHMSM(0u, 0u, 0u, (X), OS_OPT_TIME_HMSM_STRICT, &err) 03 #endi...
asked by 24.06.2015 / 21:43
1
answer

Allegro does not execute anything graphic

It just does not appear anything graphic, the functional (close the window) works perfectly, however the graphic (background color and "nave") do not work. #include <allegro5\allegro.h> #include <allegro5\allegro_native_dialog.h> #...
asked by 28.06.2015 / 18:43
1
answer

Matrix with dynamic columns?

I have an array like this: int numeros[qNum][6]; In fact it stores an integer by line separating the digits, eg: I have the number 1234, in the array will be: numeros[0][0] = 1; numeros[0][1] = 2; And so on. But...
asked by 08.10.2015 / 16:58
1
answer

Doubts about list chained in C

Hello, I made a simple threaded list in C, with the insert start and insert functions at the end, how do I do the removal functions? #include <stdio.h> #include <stdlib.h> typedef struct no{ int num; struct no *prox; }No;...
asked by 26.05.2018 / 23:25
2
answers

Concatenating two linked lists in C

I'm starting my studies on dynamic structures in C and I'm having trouble making a code to concatenate two lists. The part of painting on the screen the contents of the lists is working, but at the time of concatenating it appears "Segmenta...
asked by 27.02.2018 / 03:57
1
answer

Recursive function to finalize a list

I want to do a recursive function to deallocate the memory of each block of the list, but when I print it after using the function, it loops and memory addresses are printed when I ask to print (the correct thing is not to print anything).   ...
asked by 03.10.2014 / 22:27
1
answer

Calculation of survival in C

Researching about calculating a person's survival days through the days difference found a program here that served as the basis for this so I added the necessary calculations to know the amount of: hours, minutes seconds, days, months, years....
asked by 22.12.2017 / 14:29