Questions tagged as 'vector'

1
answer

problem with vectors in android studio

I'm having problems inserting vectors into android studio My project was created in api21 (5.0), I am testing on a 7.0 device and everything is ok, working perfectly, but an error occurred while running the app on a 5.1 and 6.0 device....
asked by 18.02.2018 / 16:49
1
answer

Reach problem in C ++

I'm a beginner in C ++ programming and I came across a problem when I tried to run my code in atom , using the gpp-compiler package and MinGW: 'function' was not declared in this scope l.8). I did not understand the reason for the error, can an...
asked by 11.02.2018 / 01:22
0
answers

Matrix and vector comparison C / C ++ [closed]

I need to compare an op vector entered by the user with the first 10 columns of each row of a 12x12 array. for(k=0; k<10; k++){ for(i=0; i<12; i++){ for(j=0; j<10; j++){ if(op[k]==d[i][j]){ if(i==1)...
asked by 13.12.2017 / 06:44
1
answer

Thread Usage in c ++

I created a code to check the prime numbers, but I'm trying to use all the cores in my processor to calculate them. #include <iostream> #include <Windows.h> #include <vector> #include <algorithm> #include <thread>...
asked by 03.03.2017 / 22:51
1
answer

Which way to delete element of a vector correctly? C ++

Can the same way be to delete an integer vector, or an object vector? Whenever an element is deleted, does the vector position have to be changed? Is the situation the same eliminating at the beginning or at the end? As an example: vector...
asked by 25.01.2017 / 22:58
1
answer

How to get a pointer from a class c ++ vector

How do I get a pointer from a class c ++ vector? For example I have a vector a; , how do I get a pointer to just one vector element?     
asked by 13.04.2018 / 19:54
1
answer

How to overload the assignment operator in a class containing vector?

I would like to overload the assignment operator ( operator= ), I know I have to reserve memory, and copy data from one to the other, however I do not know how to copy one vector to the other without knowing the size of it . class Pe...
asked by 26.12.2016 / 21:40
1
answer

Class c ++ has no member named

I'm starting to develop a list of lists to represent a graph in memory. I just did this first part and am getting the following error: class std::vector<No> has no member named 'getId' Follow my code so far ... main.cpp: #incl...
asked by 29.04.2016 / 19:51
1
answer

Reading values from a string

I started to study c ++ now and I do not quite understand it yet. I need to get a lot of information on each line of a string vector, so I thought I'd use sscanf , however I'm getting the following error: In function ‘int main()’: error...
asked by 15.02.2018 / 15:18
1
answer

C ++ Heterogeneous list

I've been looking for heterogeneous lists in% 1%, vector , array on the internet for weeks on c ++, but on all websites and forums the answer is the same: list , but I wanted a way to do in pure C ++. I developed this: #incl...
asked by 18.07.2017 / 20:33