Questions tagged as 'array'

2
answers

How to avoid error "warning: ISO C ++ forbids variable length array 'fileName' [-Wvla]" in C ++ 11

I have the following piece of code that aims to create a buffer for the file name that will be created based on some information provided in the instantiation of the class: char fileName[size]; memset(fileName,'\n',size); sprintf(fileName, "%s...
asked by 11.10.2016 / 10:09
1
answer

Changing values of a two-dimensional array - PHP

Hello. I need to mount a foreach to update the array values below: Array ( [0] => Array ( [id] => 1 [profissao] => Ajudante de cozinha [interesse] => ) [1] => Array...
asked by 09.02.2015 / 23:39
2
answers

How to use data from an Array without foreach

I have a function in my Model : public function get_learning_category_list() { $categorias = $this->db->select('t1.id, t1.title, t1.metadata, t1.meta_title, t1.description, t1.meta_description, t1.meta_spam, t1.url, t1.alt_img...
asked by 08.04.2015 / 16:06
1
answer

Pass and return vector of type defined by struct as parameter of a function in C

I'm finding errors for the following code: #include<stdlib.h> #include<stdio.h> #include<stdbool.h> #include <locale.h> #define true 1 #define false 0 const int limite = 100; //Definição da estrutura Conjunto como um...
asked by 09.04.2015 / 11:51
1
answer

Insert values from an array of bytes into an int array without converting them

I have this int vector: int[] vetor = new int [dataRegCodeToCompare.length]; and this vector byte: (which receives the digest of another byte array) byte[] dataRegCodeToCompare = md5.digest(toHash); I want to put the values of the byte...
asked by 22.04.2015 / 20:40
2
answers

Can I put an array as a parameter of another array?

for(i=0; i<=203; i++){ array2[3][i]; array1[array2][2][string]; /*string corresponde a uma string ja definida e nao relevante para a questao*/ (...)     
asked by 04.12.2014 / 00:07
1
answer

Undeclared variable

You are giving error on lines 118, 127, 133, 139 ...    127 20 'vector' was not declared in this scope #include<stdio.h> #include <stdlib.h> #include <string.h> #define tamanho 5 int pos=0; struct agenda {...
asked by 06.12.2014 / 02:37
2
answers

Remove array from array array

I have the following data in an array var array = [ ["755", "20", "E", "274", $$hashKey: "0AK"], ["756", "20", "E", "274", $$hashKey: "0B7"], ["455", "30", "E", "159", $$hashKey: "0BQ"], ["7...
asked by 25.11.2014 / 18:33
1
answer

Pass array of a checkbox as parameter

I'm developing in PHP a basic system, and on the home screen I'm listing all registered users. For each user, I have a checkbox that gets the value of the user code. I would like to check if the checkbox is correct and how would I go about sendi...
asked by 31.10.2014 / 10:47
1
answer

Get field values from an NSArray with CoreData content

I have a table in coredata with some fields, I can get the size of these values but I need the values of each field, I have this code: var request:NSFetchRequest = NSFetchRequest(entityName: "Radar") //my table in coredata let appDeleg...
asked by 12.06.2015 / 23:48