Questions tagged as 'struct'

2
answers

Show value of a struct

I'm having a problem that is probably silly but I do not understand why it does not work despite its simplicity. Having a struct composed of the components of a vector in 3D, I only wanted to show one of them after I typed it and yet i...
asked by 23.01.2018 / 13:46
1
answer

Pointer to struct in ansi C

I have defined the following globally. char buffer[32+1]; TOKEN tokenActual; int flagToken = 0; typedef enum{ INICIO, FIN, LEER, ESCRIBIR, ID, CONSTANTE, PARENIZQUIERDO, PARENDERECHO, PUNTOYCOMA, COMA, ASIGNACION, SUMA, RESTA, FDT,...
asked by 20.10.2017 / 17:14
4
answers

List of type struct, modify a field of a struct of a cell in the list leaving the rest equal

After searching several days through the network, I have not been able to resolve it: struct TART { public DateTime time; public int color; public double altura; public string probado; } List<TART> LART = new List<TAR...
asked by 15.05.2017 / 19:42
3
answers

Difference between structures and classes in C ++

What is the difference in C ++ between a structure and a class? According to what I understand, a structure is the way in c ++ to create an object, just as in python class is used.     
asked by 01.12.2016 / 21:59
3
answers

How to show the number of employees by sex?

I have the following code which shows me the data of N number of employees admitted My question is this: How do I show the number of employees by sex? int main(void){ /*Declara las variables para los ciclo for*/ int i = 0, n = 0...
asked by 29.03.2018 / 17:16
3
answers

How to read strings of a structure passed by reference

This is my Structure typedef struct{ char Nombre[20]; }Cliente; And they ask me for a function that captures the name by means of the structure and performs this function void Captura_cliente(Cliente *client){ printf("Escriba...
asked by 20.12.2018 / 10:19
1
answer

Show number of numerators = 3 in a struct

I have the following program in C the user enters numerators and denominators in an integer struct and the number of numerators with value "3" must be displayed: #include <iostream> #include <stdio.h> #include <stdlib.h>...
asked by 10.07.2018 / 08:11
3
answers

Segment Violation

The problem is that when executing the program it produces a segment violation and I can not find the reason why. The goal is to reach the "error detectado en la tabla" line #include <stdio.h> #include <stdlib.h> #define SI...
asked by 13.05.2018 / 03:31
1
answer

Can you define the name of a structure with a variable?

The question is as follows (keep in mind that I am just learning C): Suppose I define a structure similar to this one struct Alumnos{ char asignatura[25]; int nota; }; and I want the user to enter a last name, save it in a vari...
asked by 28.01.2018 / 22:57
2
answers

Doubt with Pointers to fix Structure Variables

My question is, why is the pointer const wDeck , which is as a parameter in the functions fillDeck , shuffle and deal , does not have brackets at the end (that is, it is not a pointer to an array unlike the other paramet...
asked by 23.01.2017 / 18:11