Questions tagged as 'c'

1
answer

Print of Chained List values - Problem with pointers (C language)

I'm having trouble printing the values in my list. I believe the function is right, however the following error is occurring when I try to compile: "error: expect declaration specifiers or '...' before '&" token ". I believe there is an error...
asked by 22.07.2017 / 06:30
1
answer

Greater precision in distance problem between two points

I'm trying to solve a minimal tree problem, where I try to find the minimum path to connect all of us. The nodes represent objects with position defined by x, y (integers) in space, so I find the distance between one and the other by the followi...
asked by 17.08.2017 / 06:08
1
answer

queue items in a queue (pointers)

Hello, I'm implementing a function to insert elements in a queue and I noticed that after the first element entered, the pointer headPtr and'tailPtr estão apontando para o mesmo lugar, logo o problema só pode estar na função lines...
asked by 09.07.2017 / 18:52
2
answers

remove data from an object list

I'm having trouble removing an object from the list according to a code. I tried to do this: void turma::removeraluno (int matricula){ // remover o aluno pelo codigo de matricula list<aluno>::iterator it; for (it=lista.b...
asked by 02.08.2017 / 08:46
0
answers

Old Game in C with MiniMax. Problem printing impressions

I and two other friends are doing a game of the old in C using MiniMax and tree as a Data Structure project and we are having a problem when it comes to receiving the game, and also when it is time to show it to the user. We believe that the err...
asked by 30.06.2017 / 05:09
1
answer

List of lists

I need to create a road map, where each path points to another, and so on. I'm using pointer pointer to a list, so I can build something like an adjacency list, but at the time of inserting paths, something goes wrong on the second path and the...
asked by 16.07.2017 / 08:00
2
answers

Check if a date is valid or not in C?

I need to check whether a date is valid in C, and for this I will have a function called verificarData that will be passed to it by the user input and will check whether or not it is a valid date. But I'm in doubt, because I'll have to...
asked by 16.06.2017 / 23:16
1
answer

How to create a C ranking?

How can I read and sort a text file where the information looks like this: carlos 5 lucas 20 josue 10 * The file looks like this. Saved randomly but when I read the precise information that is in the order of those who hav...
asked by 16.06.2017 / 22:10
1
answer

Problem in orderly insertion of structs into records

I'm doing a job where I have to insert structs in alphabetical order into files, where the structs are political and the files (which together form a linked list) are the parties. I'm having a hard time figuring out how to insert politicians in...
asked by 11.06.2017 / 04:51
2
answers

Change command prompt properties in c

I'm new to c. I would like to know if it is possible to change properties of the command prompt by c, such as cmd size, width or even the font?     
asked by 22.06.2017 / 02:15