Questions tagged as 'array'

1
answer

Error creating array of strings

I'm having problems trying to initialize a vector of strings so my code looks like this: #include <stdio.h> #include <stdlib.h> #include <string.h> int main(){ char *str[3]; printf("DIGITE QUALQUER STRING: ");...
asked by 05.09.2017 / 21:47
1
answer

Object Keys from a JSON is saving the last value

People when I run Object Keys it captures every Array of the Object and updates the data of component only not all, and the output only comes with the last Array value: var obj = { index: { path: "/", component...
asked by 20.10.2017 / 22:46
2
answers

Array inside PHP Array

I'm creating a system where you can add medicines by protocols. Ex:    PROTOCOL NAME [ARRAY] NOME DO REMÉDIO [ARRAY 2] NOME DO ITEM QUANTIDADE TEMPO DE INFUSÃO [ARRAY] NOME DO ITEM 2 QUANTIDADE 2...
asked by 23.08.2017 / 21:15
1
answer

Error declaring an array

I made an array [day] [time], but I get an error initializing it. I get this error and I do not know how to fix it    error : attribute The code looks like this: struct horario{ char M[8][40] = {{"X 8 9 10 11 12 13 14 15 16 17...
asked by 23.07.2017 / 18:54
1
answer

Convert a JSON String to an Array of the JAVA Object

Hello, I can not do the conversion, my string is coming like this. { "empresa1": { "category_id" : "Item 1", "id" : 1, "imagePath" : "imagem", "name" : "empresa 1", "short_desc" : "desc da empresa 1" }, "empresa2":...
asked by 22.08.2017 / 21:22
1
answer

Get values from within stdClass array stdClass

I have this class where I can do the query and return data from an external webservice: $params = array( 'usuario' => $usuario, 'senha' => $senha, 'quantidade' => 2 ); $wsdl = 'http://xxxx.com?WSDL'; $options = array(...
asked by 28.06.2017 / 20:39
1
answer

Passing by reference, and saving data from a file to a vector

I'm having trouble saving the read data from a text file and a vector from a structure I created. My goal is to open a text file, grab the data that is saved in it, and save it to a vector of type INFO. My program compiles perfectly, but when...
asked by 20.08.2017 / 06:13
1
answer

Function is zeroing the last value of the vector

#include <stdio.h> #include <stdlib.h> /** 2. Faça um programa que, a partir de um vetor de 12 posições, crie funções para: A. Digitar valores no vetor; B. Imprimir o valor somatório de seus itens; C. Imprimir a média dos valore...
asked by 19.06.2017 / 05:06
1
answer

Problem with char returning strange characters

The intention is to replace all words toda with 0 , however after X characters it begins to return strange values as can be observed in the comments. I think I'm handling the parameters wrong, but at what point? Why? #include&l...
asked by 03.06.2017 / 18:06
2
answers

How to sort Record in Delphi (similar to ORDER BY)?

I bring some bank records with a specific order and play into a vector of type record ". Then I need to add more items to that vector by keeping the initial sort. Since the ordering is done in SQL the records that are added then en...
asked by 30.05.2017 / 15:47