Questions tagged as 'struct'

1
answer

Code error: lvalue required as left operand of assignment

Why am I getting this: lvalue required as left operand of assignment In this line of code: original[0] = 100; The code I have is this: #include <iostream> #include <queue> #include <list> using namespace std; struc...
asked by 26.11.2018 / 20:47
1
answer

Difference between Struct and an incomplete Struct type

When declaring these two struct, what are their differences? Do the fields change from where they can be invoked? Struct general: typedef struct Etapa{ int h, m, s; }Etapa; Etapa etapas[3]; Etapa *puntero_etapa = e...
asked by 14.09.2017 / 16:35
1
answer

Doubt C input flows

The following program works well for me in C ++ with its respective changes (cin and cout), however, when passing it to C, the input provided by the keyboard fails. #include <stdio.h> #include <stdlib.h> struct etapa{ int h,...
asked by 13.09.2017 / 18:27
2
answers

C ++ - Problems with Char variable input

I am trying to record a series of data in a struct in c ++. However, I have the problem that the field "activepolicy" (what should have only V and F) does not take the values I want: Saves those from the subsequent field. I think it's a problem...
asked by 31.08.2017 / 04:58
1
answer

typedef struct MyStruct MyStruct ;?

I am reading a book of design patterns and use the typedef in the following way. What would be the function in this case? typedef struct MyStruct MyStruct; struct MyStruct { char var_1 ; char var_2 ; }     
asked by 07.12.2018 / 23:28
1
answer

C - Modify a struct from a file

I just started with C and I have no idea the truth. The thing is to make structs and put them in a file and then read and modify them. I have no idea how to modify a struct of the particular file. I hope you can help me, I'm a little bad at this...
asked by 02.04.2018 / 03:00
1
answer

Error "was not declared in the scope"

This error comes to me in the first line;    "Something was not declared in this scope". I know it's a very basic error, but I'm not realizing what I'm failing and why. This is my code: void funcion(Algo x){ x.b= 1 ; } int main(...
asked by 02.09.2017 / 03:10
1
answer

C # - Can a struct list be done? How do you declare?

Can a struct list be done? How do you declare? How would an element be added or deleted? Thanks. What I intend to do is something like: List<T_POC> DatosActu= new List<DatosActu>(); public struct DatosActu {...
asked by 02.05.2017 / 09:27
0
answers

I want to know how to pass a struct array by reference in c

The problem is the following one I want to pass an array, struct array by reference to be able to fill my struct by means of a procedure try it analogously to how it is normally done with an array when compiling it tells me that the argume...
asked by 16.06.2018 / 01:56
0
answers

PYTHON - struct.error: unpack requires a buffer of 17665190 bytes

I have generated an audio graphic representation script, however, it throws me the following error: Here I leave my code: import wave import struct import sys import numpy as np from math import sqrt import matplotlib matplotlib.use('...
asked by 01.05.2018 / 19:19