Questions tagged as 'c'

0
answers

Retrieve threaded list of .bin file

I'm programming in C and I have a code that uses a 50-position sequential list to store the first address of several linked lists in each of their spaces, so that's fine, the problem is when I fill in the list and write to a .bin file, because a...
asked by 12.11.2017 / 22:32
1
answer

Program stops responding when I try to fill in the list

This is the code, it simply leverages the values and puts them in the list, but in the last loop it stops responding #include<stdio.h> #include<stdlib.h> typedef struct pessoa { int horas,minutos; int conversao; int ate...
asked by 11.11.2017 / 22:38
1
answer

Difficulty moving character on board

I have an array of structures as a board. My character starts at position [0] [0]: tabuleiro[0][0] = personagem; Thecharacterisdisplayedcorrectlyinitsinitialposition,butIcannotmoveitusingthecodebelow(itisincomplete,butshouldworkasfarasIdid...
asked by 12.11.2017 / 22:45
0
answers

Language C - can not access memory 0x42be0000

I can not access memory and bring value. The variable nameCar also gives the same message. #include <stdio.h> #include <conio.h> #include <time.h> #include <string.h> #include <stdlib.h> #include <ctype.h>...
asked by 13.11.2017 / 23:27
0
answers

Matrix and vector comparison C / C ++ [closed]

I need to compare an op vector entered by the user with the first 10 columns of each row of a 12x12 array. for(k=0; k<10; k++){ for(i=0; i<12; i++){ for(j=0; j<10; j++){ if(op[k]==d[i][j]){ if(i==1)...
asked by 13.12.2017 / 06:44
1
answer

"void * reader (void * i)" What is the equivalent in C ++?

I'm studying Operating System and I have an exercise to do in C ++ and I'm having doubts (the book only comes in Java), I have to implement a classic reader and writer problem using traffic lights and control variables ... And I'm studying some...
asked by 08.12.2017 / 21:46
0
answers

Global vector with variable length - programming in C [closed]

I'm trying to create a global vector whose size is defined inside a function. My code looks like this: struct body{ double m; double a; double n; double e; double w; double I; double W; }; struct body *planet_globa...
asked by 10.11.2017 / 15:32
0
answers

Outgoing file error

In an exercise, I need to read an input file as follows: # add # Jabuticaba # Fruto de jabuticabeira. Jabuticabeira. # add # Vacilar # Não estar firme. Cambalear. Oscilar. Tremer. # add # Jacapa # Pássaro brasileiro escuro, de bico branco. # s...
asked by 16.11.2017 / 19:11
0
answers

Syntax Error / Possibly Logic in a Recursive Function

Statement of the question: Consider the following functions: int suc(int n) { return n+1; } int pred(int n) { return n-1; } Using these functions (and no arithmetic operator), create recursive functions to determine: (a) The sum of two natu...
asked by 07.11.2017 / 23:02
0
answers

POSIX - problems writing to file using open and write

On this code below, this is giving the problem in write, however if I use creat without the flags it runs. The goal is to copy a file, the file that will be copied if it is called 'test.txt' and what will be created 'novoteste.txt', but if novot...
asked by 07.11.2017 / 18:26