Questions tagged as 'c'

1
answer

Save in matrix [closed]

How do I save letter by letter of the new word in a matrix? #include<stdio.h> int main() { int i=0,j,arr[26]={},temp; char s[10],arr1[10],*p; printf("Enter the string\n"); scanf("%s",s); p=s; while(*p...
asked by 26.06.2017 / 04:03
1
answer

Problem auto counter id file in c

I have a problem with this function, I would need the id to auto-add each time I want to create a user, the function works, the problem is that when the program is closed and reopened the counter returns to 0 and does not at the value I had befo...
asked by 15.06.2017 / 21:52
1
answer

C error: dereferencing pointer to incomplete type again

Good for everyone, I'm stuck with this code ... it's something like a case that was presented previously but by making the corrections suggested in that post, I still have the same error ... please if you could help me. .. I have these two st...
asked by 13.06.2017 / 01:31
1
answer

multidimensional array pointers

The following code is supposed to order the surnames alphabetically but for some reason it stops, the compiler does not mark any warning, nor error so if someone knows what happens explain to me what happens please #include <stdio.h> #in...
asked by 31.05.2017 / 18:54
0
answers

Receive message with GetMessage of type struct and assign it to a variable

I have already sent the message to the desired thread through PostThreadMessage and in the lparam parameter I pass the memory address of the structure I want to send: PostThreadMessage( p->idHilo, WM_USER, 10 , (LPARAM)&estructura);...
asked by 21.05.2017 / 00:47
1
answer

Awaken processes with signal in C

I have two child processes from the same parent, and I want them to do nothing until a signal SIGUSR1 wakes up one or the other. pid1=fork(); if (pid1>0) { pid2=fork(); } What would be used? Maybe pause() ? How would you reac...
asked by 18.05.2017 / 13:20
1
answer

Print a couple of characters without repeating [closed]

What I have to do is store a randomly selected pair of characters in a matrix and print it like this. ? # ¡ x x ? # ¡ 0 - + * + 0 - * The problem is that I can not find a way to mark the characters that have come out twice, so as not to inc...
asked by 11.05.2017 / 16:09
1
answer

How do you reserve space with malloc for a struct?

I do not know if I'm doing the memory reserve properly for my struct, this is my code: datos_entrada = (pmanager_t *)malloc(sizeof(pmanager_t)*(n_max_cintas)); It gives me problems when trying to write in a pipe according to valgrind and n...
asked by 27.04.2017 / 10:59
0
answers

Read the csv file and delete it in C

Yesterday they helped me to read a csv file and remove commas (THANK YOU) now they have asked me to delete the contents of this file, they told us that the content could be loaded in an array and from there to erase the data and redo the file bu...
asked by 03.05.2017 / 06:40
2
answers

Xcode does not print without a line break

A code that simple ... From one day to the next Xcode does not print anything without adding a \n to the end of the string. The same thing happens in c ++, it does not print without a endl . #include <stdio.h> int main()...
asked by 05.04.2017 / 06:26