Answer the question
In order to leave comments, you need to log in
What is better to use std::vector or plain array in c++?
I have little experience in c++ programming. There was a task of analyzing data coming from a certain sensor (filtering, noise reduction, etc.).
The data is in the form of double numbers.
The question is: what is better to use to work with such data? Simple dynamic array or std::vector or maybe something else?
Answer the question
In order to leave comments, you need to log in
It is better to use a vector from an array and a vector - there are iterators there, and this is a more convenient array traversal and it is more difficult to go beyond the boundaries when traversing. You can also look in the direction of List, but there the data is stored differently and the list takes up a little more memory in the general case.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question