Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. No std::find() in Qt..
Forum Update on Monday, May 27th 2025

No std::find() in Qt..

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 6 Posters 1.9k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • EngelardE Offline
    EngelardE Offline
    Engelard
    wrote on last edited by
    #1

    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?

    0_1542037875390_sdfsdf.jpg

    1 Reply Last reply
    0
    • JohanSoloJ Offline
      JohanSoloJ Offline
      JohanSolo
      wrote on last edited by JohanSolo
      #2

      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.

      `They did not know it was impossible, so they did it.'
      -- Mark Twain

      EngelardE 1 Reply Last reply
      2
      • JohanSoloJ JohanSolo

        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.

        EngelardE Offline
        EngelardE Offline
        Engelard
        wrote on last edited by
        #3

        @JohanSolo said in No std::find() in Qt..:

        I bet you forgot the #include <algorithm> statement...

        Have you read head post?

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          std::find() is defined in <algorithm> and when VS does not show it in the help you should ask in the visual studio forum.

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          EngelardE 1 Reply Last reply
          0
          • Christian EhrlicherC Christian Ehrlicher

            std::find() is defined in <algorithm> and when VS does not show it in the help you should ask in the visual studio forum.

            EngelardE Offline
            EngelardE Offline
            Engelard
            wrote on last edited by
            #5

            @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.

            aha_1980A 1 Reply Last reply
            0
            • EngelardE Engelard

              @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.

              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Engelard

              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 ;)

              Qt has to stay free or it will die.

              EngelardE 1 Reply Last reply
              6
              • aha_1980A aha_1980

                @Engelard

                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 ;)

                EngelardE Offline
                EngelardE Offline
                Engelard
                wrote on last edited by
                #7

                @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.

                JKSHJ 1 Reply Last reply
                0
                • EngelardE Engelard

                  @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.

                  JKSHJ Offline
                  JKSHJ Offline
                  JKSH
                  Moderators
                  wrote on last edited by
                  #8

                  @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 see find() in that file?

                  Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                  EngelardE 1 Reply Last reply
                  0
                  • JKSHJ JKSH

                    @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 see find() in that file?

                    EngelardE Offline
                    EngelardE Offline
                    Engelard
                    wrote on last edited by
                    #9

                    @JKSH nope, no find function in there. But it works and compiles.

                    1 Reply Last reply
                    0
                    • mranger90M Offline
                      mranger90M Offline
                      mranger90
                      wrote on last edited by
                      #10

                      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.

                      EngelardE 1 Reply Last reply
                      0
                      • mranger90M mranger90

                        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.

                        EngelardE Offline
                        EngelardE Offline
                        Engelard
                        wrote on last edited by
                        #11

                        @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.

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved