Questions tagged as 'array'

1
answer

How to know how to count repeated numbers in a vector?

I'm wondering if there are any repeated values in the array. Here is the code I tried, but I did not succeed. #include <stdio.h> int main(int argc, char** argv) { int a, i, j, c = 0; scanf("%d", &a); int vetor[a]; for(i =...
asked by 29.01.2018 / 16:28
1
answer

unmount objects in an array

I have a search method in the database that brings me the following result: NotethatinsidetheObject[4]comesanotherarraythatcontainsPeople,People,andPeople.Iwouldlikeittoreturnonlythiswayandnotinsideanotherarrayasitishappeningnow,itshouldlook...
asked by 14.01.2018 / 16:30
2
answers

Vector size in C

I'm new to the C language and am having trouble determining the size of struct-type vectors. Example. I have a category-type structure with three types of variables 1 int and 2 char. #include <stdio.h> #include <stdlib.h> stru...
asked by 04.02.2018 / 03:32
2
answers

Strings and Arrays, problems getting the right result

The purpose of the program is to display information in one option and a 10-question inquiry in another option. Each discipline has 10 questions, and each discipline is done in a subprogram. the problem is the use of the string. typedef struct...
asked by 21.01.2018 / 19:06
1
answer

stack insertion vector returning all zero

Now, I posted the algorithm for this address below here because I had problems with unpacking and removing was solved until then. Deploying Dynamic Stack But as I was reviewing the code and therefore leaving them better I decided to put a...
asked by 19.01.2018 / 22:14
1
answer

Error with array in C - arduino

I'm having an error signing an array: Menu m = Menu(); m.Options[4] = {"teste1","teste2","teste3","teste4"};//Erro aqui m.Show(); Menu Class: class Menu { public: String Options[]; int index = 0; int len = 0; String Show()...
asked by 23.12.2017 / 15:09
2
answers

Collecting data from an array

I have an exercise for college but I'm lost in my logic and how to solve it. I have to collect the results of games and set the score for each result. the winner takes 3 points, a draw guarantees 1 point and the defeat does not get any points....
asked by 05.12.2017 / 10:45
1
answer

How to transform into a lowercase a value of a struct?

The next function should turn variables into lowercase and then compare them. I've tried converting before, but also bugou . Arithmetic use of pointers next to variables of struct . Pointer points to struct . How to fix the error...
asked by 02.11.2017 / 04:01
1
answer

I can not get an Array

I'm trying to get a value inside an array, but it does not print anything from the id field, which is the field I want to get $jsonc = file_get_contents("https://api.themoviedb.org/3/search/tv?query=todo%20o%20mundo%20odeia%20o%20chris&api...
asked by 22.11.2017 / 17:57
1
answer

Avoiding arrays as values when using array_merge_recursive ()

I have the following array: $vagas = array( '2017-09-22' => array( '11:30' => 2, '12:00' => 3, '15:00' => 1 ), '2017-09-23' => array( '9:00' => 5, '10:00' => 3, '11:30' => 2 ) ); This...
asked by 24.10.2017 / 19:23