Questions tagged as 'c'

0
answers

FUNNY GAME 2048 IN C

Eai Galera, I have a job for college in which I play the game 2048 in C. I am killing myself with this already, the teacher asked the user to choose the size of the board and with what value the game would start (2, 2 or 4, 2,4 or 8), I've done...
asked by 15.06.2017 / 17:39
0
answers

C - PIC recording program 18F4550 via USB

At first, I'm a layman when it comes to programming. Because of this, I am developing quick and easy programs to improve my knowledge. I have a development board for a PIC18F4550, with LEDs on the RB pins, some on the RD and RC. The buttons a...
asked by 03.07.2017 / 17:53
1
answer

How to manipulate a vector of structs in an external function? Follow example

I am doubtful in an issue. The following is the statement: Implement a library control system with functions to register, query, change, and remove books. The attributes of a book are: Name (Book title, with spaces) Author (Full name...
asked by 04.07.2017 / 22:59
2
answers

Description of a function statement

I have a question in making descriptive comment related to the parameters of these 3 functions below. int proximoClientePreferencial(CLIENTE *filaPreferencial){ void mostrarFilaPreferencial(CLIENTE *filaPreferencial){ void adicionarFilaPrefere...
asked by 02.06.2017 / 16:17
1
answer

Search between two vectors

I am doing a project for a course, but I have some problems. The problem to overcome is, in a text file, consisting of id \t and a sequence of 2048 fixed '0' and '1' , insert a sequence and search for the most similar element...
asked by 02.06.2017 / 13:12
1
answer

Vector of struct and pointer to char

Why this syntax is wrong: #include <stdio.h> typedef struct { char* nome; char* numero; }Agenda; void adiciona(Agenda* reg, int i) { scanf("%s", reg[i]->nome); scanf("%s", reg[i]->numero); } void imprime(Agenda*...
asked by 03.06.2017 / 00:22
2
answers

How to create a password mask in C

I created this code in C to generate masks in the password, but it does not let you delete the characters afterwards nor save the variable correctly. What can it be? Follow the current code: void login(){ int i,tam; char usuario[80],...
asked by 07.06.2017 / 15:12
1
answer

Multiplication of two arrays in C. Transfer of values between functions

I have recently been given a 'matrix multiplication' project, where I have two functions: one 'main' , and another a main, will read the different values of the elements of the two arrays a multiply defined and write the result of the product...
asked by 21.05.2017 / 18:50
3
answers

What am I doing wrong? (struct) [closed]

struct book{ char code[5]; char title[30]; char category[15]; char author[30]; float price; }; struct book book[100]; book[0].price = 1; It is giving error on the last line     
asked by 06.06.2017 / 01:31
1
answer

word manipulation with Allegro

Hello, I'm having a question about manipulating strings with allegro, as well as using "fgets" or "scanf" in C to get a keyboard word I want to know how to do this with allegro.     
asked by 13.05.2017 / 16:58