Questions tagged as 'c'

1
answer

Spin Problems AVL Trees

Live, I am developing code for an AVL tree. But I have problems with the rotations. Node structure: /*Node*/ struct Node{ int id; int height; char word[DIM]; struct Node *right; str...
asked by 16.03.2014 / 21:29
0
answers

Banking Saving Algorithm in C using recursion

I'm having doubts about a bank draw algorithm in C. First of all, it is better to pass the statement:    ATMs in banks are a great invention, but sometimes we need money exchanged and the machine delivers $ 100 bills. Other times, we want to...
asked by 23.03.2018 / 23:14
2
answers

Use a variable as the name of a file in C

I'm using the system("pathping xxx.xxx.xxx > c:\i.txt") function to leave the program running pathping tests and saving the result to a file to analyze later. Basically I wanted to play this function inside an infinite loop...
asked by 08.12.2016 / 18:57
0
answers

Different behaviors between Linux and Windows using threads (pthreads)

I'm using the linux pthreads library to try the threads features, the code below prints 5 messages on the screen for each thread, each thread waits its turn to display the message controlled using the semaphores, in Windows it works perfectly, h...
asked by 15.03.2018 / 20:11
1
answer

No data in the queue

In my program, I need to use a queue storage function inside another function, but I can not run, it does not store. I switched from DevC ++ to CodeBlocks and it looks like this:    "expected 'struct Row' but argument is of type 'struct FILA...
asked by 12.07.2016 / 03:11
1
answer

Problems with program that should read log file with variable-length field

I'm relatively new to the programming area and I'm doing a program where I need to read a file with 10 records with 4 fields (records of fixed size 60 and size of each variable field). However, I am having difficulties because I did all the logi...
asked by 21.08.2016 / 14:15
0
answers

Application in C Client-server for file transfer with TCP socket and thread [closed]

I would like to ask the forum help to make safe (encrypt) the transfer of a file between two computers. Below is the C source code of a client-server application for file transfer using TCP socket but without encryption of the transferred data....
asked by 25.11.2015 / 20:14
2
answers

Keyword in String C language

I'm trying to make a program in C to find a word in a string vector, returning the position of the word and when it does not find returning -1. I am having problems with substring , type my program identifies bits of words, how to fix this? #...
asked by 22.05.2016 / 04:32
0
answers

Pointer to function [closed]

I would like to ask a question that looks better with an example: I have the following code snippet in C: char texto[]="String"; int (*ret)() = (int(*)())texto; In this section above, I saw that a pointer to a function called ret is decl...
asked by 02.02.2016 / 01:49
1
answer

Is there any problem with pointers in this struct that works with linked lists?

Hello. I'm developing a game with the C ++ language and I think I'm making a mistake in using threaded lists. I emphasize that I know there are more interesting features than using linked lists in C ++, but this is a project I did for college...
asked by 13.12.2015 / 15:03