Questions tagged as 'struct'

1
answer

Error printing a structure

The program has to read and display data from a structure, the program does not throw error but in the exit it appears the name after garbage (spaces without assigning) and the last name when it is shown How can this be solved? #include <st...
asked by 03.12.2017 / 00:31
1
answer

c ++, declare a struct as a global variable

C ++, when declaring a struct as a global variable, later I can not access it from an object (class) ... The development environment consists of three files: the 1st file contains the main pgm, so the variable is defined: struct stXXX {...
asked by 25.10.2017 / 04:01
1
answer

Error adding item to the stack

I have a structure Pila that saves structures of type CD , but when adding a CD to the stack, the program crashes. From what I see it is at the moment of adding a CD to the stack, I do not know if my code is ok. I use pointers. T...
asked by 28.09.2017 / 17:47
0
answers

Deactivate s: select struct

I have the following struct statement: <s:select name="idDepartamento" cssClass="form-control" id="idDepartamento" list="@com.mncars.factura.negocio.GestionDepartamentos@dameDepartamentos()" listKey="idDepartamento" listValue="departamen...
asked by 16.08.2017 / 17:59
0
answers

C - Sometimes a function is not executed

I have a pseudo graph conformed by adjacency lists, where tree is an array of "lista_t" typedef struct nodo { int value; struct nodo *next; } nodo_t; typedef struct { nodo_t *primero; nodo_t *ultimo; int len; } lista_t; Well and...
asked by 06.07.2017 / 09:47
1
answer

.h and .cpp with array of structures

Good, I need to create a header with an array of structures and a .cpp where the methods are implemented, and it has to have a struct, and create an array of that struct, and then from another file create that array and make the operations with...
asked by 16.05.2017 / 17:13
1
answer

C ++ - Error loading data in a struct array located in a header file

I am very new to c ++ and I am having some problems with a task, the same is detailed below:  I have a struct and a function to load data into it. The program compiles correctly if all the code is in the same main.cpp, but I need it in different...
asked by 02.09.2017 / 23:49