Unsolved Is it possible to use static arrays in std Algorithms?
-
I've used always dynamic(vectors) in such functions like std::search(); or std::sort();, in all examples only vectors, so i'v started to assuming that only dynamic array is allowed.
But now i want to use simple-raw-default array, but don't know how do that properly, and maybe that approach is not safe. There is simply no ability to use functions from array like .begin()/.end().
-
-
@koahnig said in Is it possible to use static arrays in std Algorithms?:
This question has no relation to Qt.
I really can't understand point of "C++" group here, thought it for C++ in general.
Tnx for the link, from it i gain that easier would be just create temporary vector and pass my static array as parameter.
-
@Engelard
Hi
Maybe you can use std::array instead ? -
@koahnig This is "C++ Gurus" forum, I guess it is fine to ask here pure C++ questions without Qt relation?
-
To summarise:
std::begin()
andstd::end()
are the way to go