Questions tagged as 'c'

2
answers

Add item to the top list

I need to add the content, to the first place in the list. But I can not do it, any help? This is the code I have. if (primero == NULL) { //Por si el primer elemento es NULL printf("\nNuevo elemento:\n"); printf("Nombre: "); fflush...
asked by 06.11.2017 / 23:22
1
answer

Doubt in reading files to a vector of structures

I've been eating my head for several days to find an error in the program, because it does not read the data from the file I created. I've been programming for a month (It's in C language) because I'm quite new and everything seems very difficul...
asked by 09.11.2017 / 18:52
1
answer

Error calling system call through write

I try to make a system call with the word write but the compiler throws an error and says that error:    passing argument 1 of 'write' makes integer from pointer without a   cast #include <stdio.h> #include <unistd.h> #includ...
asked by 29.10.2017 / 18:47
1
answer

How to declare a pointer that contains char pointer address?

The exercise says that last name is an array of pointers to char (char *) and each position contains the memory address of last names. When I declare the data received in the function, I should write char * last names? (which would contain...
asked by 28.10.2017 / 04:23
1
answer

How can I stop a thread using a procedure in C

Assuming I have a program that requires me to use several hilos and in those hilos load the same process Is there a way that when the process ends the hilo in which it is loaded will be paused? Example: void *recorre(ch...
asked by 02.11.2017 / 20:50
0
answers

Call a program in Erlang from C

Good morning, My doubt is that if someone knows how to execute a program in Erlang from a program in C, besides passing from C a parameter to a function in that program. I'm working in Linux environment. Regarding what I searched for and w...
asked by 20.10.2017 / 00:02
1
answer

The program stopped working

It turns out that I'm doing a program that generates an array with random numbers, the program worked, but I changed some things to improve it. and it is executed but after generating 2 random values to compare them in the array, I see an advant...
asked by 14.10.2017 / 03:47
3
answers

C, Compare does not work for me

I want to compare in the if, if it is a number that does the main function of the program and if it is a letter that prints a sentence but does not work: #include <stdio.h> #include <stdlib.h> int main(){ char seguir, a; float gg...
asked by 12.10.2017 / 05:20
1
answer

How can I get them to be in order?

I have a double linked list and I want them to be entered in order by date, but I do not see what the error is: void AgrearE(NodoE **inicioptr,char id[5],char nombre[20],char desc[50],int dia,int mes,int anio) { NodoE *Nuevoptr,*au...
asked by 18.07.2017 / 22:19
1
answer

Run a program with mpi

I'll tell you my problem. I'm trying to run a program using the mpi library in linux mint. Download the package and I have downloaded the library. I can compile my program (mpicc) but when I try to run it using mpirun I get the following message...
asked by 09.10.2017 / 00:09