Solved No std::find() in Qt..
-
In VS enough to include just <vector> for using this function, in qt i've included every which related(and adviced in examples):
#include <algorithm> #include <iterator> #include <vector>
But no std::find() function available, why is that?
-
Which platform?
I bet you forgot the#include <algorithm>
statement...Edit: VS does lots of non-standard stuff, among which several
#include
are automatically done. -
@JohanSolo said in No std::find() in Qt..:
I bet you forgot the #include <algorithm> statement...
Have you read head post?
-
std::find() is defined in <algorithm> and when VS does not show it in the help you should ask in the visual studio forum.
-
@Christian-Ehrlicher again, read my first post in this topic, i mentioned that 3 inclusions, <algorithm> is included in my qt and it even allow use std:: functions from it, but i can't use exactly std::find.
-
You should be more specific with your questions.
There is definitely no
std::find()
in Qt, because Qt is not the Standard library.What you probably meant is, that the code compleation in Qt Creator does not offer
std::find()
.And there we need, to help you the typical suspicious:
- Which platform
- Which compiler
- Which Qt version
- Which Qt Creator version
- Clang Code Model enabled or not
- Which project type
- Can you provide a reproducible example?
PS: Works for me ;)
-
@aha_1980 said in No std::find() in Qt..:
What you probably meant is, that the code compleation in Qt Creator does not offer std::find()
omg thats something totally new, yes it's not offered, and function is black as it would'nt exist or unfinished code, but it works :D
Strange.
-
@Engelard said in No std::find() in Qt..:
yes it's not offered, and function is black as it would'nt exist or unfinished code, but it works :D
Hover your mouse cursor over
#include <algorithm>
and press F2. Do you seefind()
in that file? -
@JKSH nope, no find function in there. But it works and compiles.
-
In that case, highlight the function in the code and press F2 and see where it takes you.
My configuration (windows 8.1, msvc 2017, Qt 511.2) takes me to "xutility",
and, btw, the autocompletion works in this situation. -
@mranger90 said in No std::find() in Qt..:
In that case, highlight the function in the code and press F2 and see where it takes you.
it takes me nowhere lol.