Questions tagged as 'vector'

2
answers

How can I use sort with a pointer vector?

I'm trying to use sort with a vector type vector<node*> where node is a variable that I created myself. However I am not succeeding, it does not let me put that function inside the sort method. This is my code: int compOrga...
asked by 15.12.2017 / 12:53
2
answers

How do I separate a line of text and store it in a vector in Java?

I have a text file, which is read and stored in a variable linea , then I separate the content of the line with linea.split(); . How do I make the content stored in a vector, being already separated? For example: 4 1 H 6 O 3...
asked by 09.09.2016 / 17:05
1
answer

Insert an element in a position in a C ++ 11 list

I need to insert an element within a list declared as follows: list < list <unsigned int> > bucket (16); I must insert an element into one of the bucket lists as efficiently as possible. I have the position in which I should ins...
asked by 23.10.2017 / 15:51
1
answer

Store functions in classes

I have the following exercise to perform a class that calculates several of the properties of a mathematical function.    Consider a y=f(x) function defined in a [a,b] interval. You want to sample this function. To this end, the...
asked by 09.08.2017 / 14:40
2
answers

Vector repeats the data of a query

my problem is that I have the following query: SELECT respuestaId, respuesta, estado, r.preguntaId FROM respuestas r, preguntas p WHERE r.preguntaId = p.preguntaId AND r.preguntaId = 1 The result of the query is 4 responses, for exa...
asked by 07.09.2017 / 03:27
1
answer

Structure matrix c ++

Good, first to put them in contexts the function of the code is to add X products of a store and then if the client wants to add another store with And products the problem occurs when it is going to print because the rows can have diffe...
asked by 29.10.2017 / 20:30
1
answer

python and date loop

good, I am trying to create a vector that when entering a start and end date, dates are generated in between every 6 months and I can not do it in python :(. for example when I gave the input 01-01-2010 and 01-01-2012 I want the vector to contai...
asked by 19.11.2017 / 06:37
3
answers

C # arrayList of Objects

I have an arrayList called aL that contains vectors. ArrayList aL new ArrayList(); String[,] datos = new String[1,2]; elementos[0,0] = "Juan";...
asked by 06.09.2017 / 06:59
1
answer

How to read a string of a file character by character and store it within a vector c ++

Hello everyone, my problem is that I have a chain of this style. Every time I run my program the chain changes because it is random. CGGACCCGTGGTCCGAGGTCTAAAGTGATTAGAAGCCGGT The question is that I must read character by character back and...
asked by 06.12.2017 / 17:57