Questions tagged as 'c'

1
answer

How to separate global functions / variables from the program into files?

I have some files: vetores.c // função main uniao.c // função para unir vetores ordena.c // função para ordenar vetores globais.c // arquivo com variáveis globais I want to know how I reference one file in the other. Example: I need to...
asked by 04.12.2015 / 19:57
2
answers

While code does not do the correct condition

I need to create a code that reads only a double and registers in two variables the "lowest so far" and the "largest so far", I can even successfully complete a cycle but after that it prints any value that I enter. I tried some ways t...
asked by 07.11.2015 / 19:00
1
answer

Recursive function to remove from a chained headless list

I was looking for the first minimum and then removing it. Someone help? /*Escreva uma função recursiva para remover de uma lista encadeada sem cabeça uma célula que contêm um valor mínimo.*/ #include <stdlib.h> #include <string....
asked by 10.11.2015 / 07:25
1
answer

Save some elements of a struct array in another struct array

I have defined a struct array struct CAMPO campo[2] in which it will be pointed to by a pointer struct CAMPO *ptr_campo and this pointer will be pointed at the entered players in the field, here is the code defined ... #inc...
asked by 14.11.2015 / 11:05
1
answer

How to convert AnsiString to Char in C ++ Builder?

I need to choose a txt file through OpenDialog , to open through fopen . The problem I'm encountering and the conversion. The fopen function has as parameter const char , since opendialog returns the file p...
asked by 21.07.2016 / 21:13
2
answers

How do bit operators work?

I have the following code: volatile long Hex_To_int(long Hex , char bits) { long Hex_2_int; char byte; Hex_2_int = 0 ; for(byte = 0 ; byte < bits ; byte++) { if(Hex& (0x0001 << byte)) Hex_2_int += 1*(pow(2,byt...
asked by 07.10.2015 / 00:49
1
answer

Program compiles but stops responding during execution

I wrote a program that compiles, but it is not responding at runtime. This program opens a PGM file and saves the convolution derivative in saida.pgm . The LerPGM() function receives a string with the filename and returns a 2D ar...
asked by 06.10.2015 / 04:04
1
answer

Mark unused positions in a vector

We assume that, in given implementation, the positions of a vector can contain values of -2^16 to 2^16 . You must "mark" unused positions (for example, put a *). However, given the range of values, setting the positions with -1,...
asked by 03.11.2015 / 05:17
1
answer

Define an array and the type of a function in C

Hello, I'm developing a C language initialization project, namely creating a Multimedia Management System that will have to be able to manage a database of record items like CDs, DVDs and Vinyl Records. > At the moment, after declaring the...
asked by 02.03.2016 / 14:32
2
answers

How to include the headers of the gotoxy () and textcolor ()

What library could be used to compile a C code that uses the gotoxy() and textcolor() functions, by Code :: Blocks 16.1, Windows 7 environment? I'm using: stdio.h , conio.h , windows.h and stdlib.h but...
asked by 03.03.2016 / 22:15