Questions tagged as 'c'

1
answer

How to pass this parameter to a void function?

Having two functions being the first: void print_bytes (const void * end_byte, int n){ int k; k = end_byte; converte_binario(k); } Converting binary is a bit big so I'll explain, basically it converts an integer to binary. I am...
asked by 06.06.2017 / 01:21
1
answer

Texture error in opengl

I'm trying to do some things in C using SDL and opengl, and when it comes to drawing textures I can easily if I only want 1 texture object but when trying to put a texture in the background and another to any object both textures are being rende...
asked by 11.06.2017 / 22:14
1
answer

How to make variable receive function argument value?

Next: I have a code for how to create a one-point structure in an RxR plane. In case, I would like to access the "x" value of a point. Here are the codes: Point.h file: //Arquivo Ponto.h typedef struct ponto Ponto; //Cria um novo ponto...
asked by 11.06.2017 / 14:41
1
answer

Store stack in txt file

I'm starting in C and I have the following problem. I need to save strings to a txt file sorted in stack, so far so good, however I need it when I open the program again, it keeps stacking always at the top, but it is overwriting what was alread...
asked by 04.06.2017 / 16:40
1
answer

Error TESTE500K.c :(. text + 0x8f): undefined reference to 'INSERE'

Galera, I'm trying to create a list but are giving these errors TESTE500K.c :(.text + 0x8f): undefined reference to 'INSERE' TESTE500K.c: (. text + 0xa5): undefined reference to 'PRINT' [Error] ld returned 1 exit status I would have to...
asked by 14.06.2017 / 01:11
1
answer

Problems with code from a priority list in C

I'm creating a priority list in C (topological ordering) using vectors and within those vectors a linked list pointing out who has to come before whom. But it's giving the pointer error and I really can not figure it out. #include <stdlib.h...
asked by 14.06.2017 / 00:39
1
answer

Sales Rank in C

The "find player" command in my code is not working, and I also want to add a command that deletes the ranking data. Can anyone help? Follow the code: #include<stdio.h> #include<stdlib.h> typedef struct{ char nome[25];...
asked by 05.06.2017 / 00:08
3
answers

problem with inversion of values of a vector

Good evening, I can not find a problem in my code, it's a website exercise codewars ( ), for those who do not know the site, it is a site to train programming, here I am only dealing with the inversion of 3 and 7, ex: enter a array{ 1,3,4,7,...
asked by 01.06.2017 / 01:11
1
answer

Allegro 5 C / C ++: Problem with colors

I'm using allegro 5, and I read that to create colors just use al_map_rgb or al_color_html , so I made a map to easily access multiple colors: #include "allegro5\allegro.h" #include "allegro5\allegro_color.h" int main() { al_...
asked by 15.06.2017 / 00:05
1
answer

Giving Segmentation Failure Error (recorded core image)

Exercise = Do a procedure that receives, by parameter, 2 vectors of 10 elements integers and that also computes and returns, by parameter, the vector intersection of the two first. My code: #include <stdio.h> #include <stdlib.h&g...
asked by 05.06.2017 / 15:53