Questions tagged as 'struct'

1
answer

passing by struct reference does not work (dynamic queue C)

I'm trying to implement a Dynamic Queue. When I initialize the program (start and end = NULL), and then put to queue a value (function queue) the "end" pointer receives the new queue item, however the "start" does not, whereas in the function I...
asked by 13.11.2018 / 04:01
1
answer

I can not do these steps! I wanted help

(b) Find the student with the highest grade in the first test. (c) Find the student with the highest overall average. (d) Find the student with the lowest overall average. #define MAX 50 struct { int ra; char nome[MAX]; float...
asked by 17.06.2018 / 04:41
1
answer

Copy string to struct

When trying to copy the String nome into the String in the Struct novo->nome the program stops working, if I comment the function strcpy(novo->nome,nome); the code executes normally. //Função de inserção: lista *inse...
asked by 11.08.2017 / 16:58
2
answers

Structs not fed

Dear C programmers, good evening, I ask them for help in the following case: I want to feed an array of structs to each interaction in a row of a file, the problem is that although I can read the file line, I can not send the data to the stru...
asked by 15.11.2017 / 02:38
1
answer

Calculate distance between two points in C ++ using struct

I am having trouble printing the result, but before that it is not done because it is a new type created by struct it does not calculate since it asks for type double follow the code #include <iostream> using namespac...
asked by 18.03.2015 / 14:15
1
answer

Get size of a two-dimensional array

I have a two-dimensional array of char dynamically allocated, how do I get its size? I would use sizeof (client); For example, I instantiated a struct client, Customer ** customer; then in the code I'm allocating it as it goes (tamVetor ++...
asked by 01.07.2018 / 02:57
1
answer

How to check if the limit of a vector has not been exceeded?

Good afternoon, gentlemen! I am doing a college job that asks you to create a schedule. I've done most of the code, but I can not see the light so when the user tries to register a person in the calendar, show whether the calendar is already...
asked by 20.09.2018 / 19:59
1
answer

Function that converts string to lowercase and compares [duplicate]

struct registro{ /*Estrutura para guardar os dados do usuário*/ char usuario[50]; }atual[1000], *ptr; main() { int v = 0; verific = 0; //posicao e variavel para comp. de string volta_usuario: printf("\n\t\t\tUsuário: "); gets(atual[v].usuario)...
asked by 03.11.2017 / 03:59