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. not giving error for the undefined class

not giving error for the undefined class

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 377 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.
  • S Offline
    S Offline
    seok
    wrote on last edited by
    #1

    hi

    do we have class StorageType in Qt
    because i was trying to compile part of visual studio c++ code in Qt for my project

    there is one line of code which goes like his

    class < class StorageType > template
    {

    }
    it is not giving error for this line of code( no where in the code the class StorageType is declared/defined) so i was wondering do we have something in Qt

    Thank you

    jsulmJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Please post a complete minimal compilable code sample that shows that lack of error.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • S seok

        hi

        do we have class StorageType in Qt
        because i was trying to compile part of visual studio c++ code in Qt for my project

        there is one line of code which goes like his

        class < class StorageType > template
        {

        }
        it is not giving error for this line of code( no where in the code the class StorageType is declared/defined) so i was wondering do we have something in Qt

        Thank you

        jsulmJ Online
        jsulmJ Online
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @seok said in not giving error for the undefined class:

        class < class StorageType > template
        {
        }

        What code is that?
        Is this the real code you want to compile?
        Shouldn't it be like

        template<class StorageType> class ...
        

        ?
        If so, then there is no reason for any error, as StorageType is a template parameter.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        S 1 Reply Last reply
        2
        • jsulmJ jsulm

          @seok said in not giving error for the undefined class:

          class < class StorageType > template
          {
          }

          What code is that?
          Is this the real code you want to compile?
          Shouldn't it be like

          template<class StorageType> class ...
          

          ?
          If so, then there is no reason for any error, as StorageType is a template parameter.

          S Offline
          S Offline
          seok
          wrote on last edited by
          #4

          @jsulm yes it is like
          template<class StorageType> class only i am extremely sorry for the mistake i have done while posting the question

          sorry

          jsulmJ 1 Reply Last reply
          0
          • S seok

            @jsulm yes it is like
            template<class StorageType> class only i am extremely sorry for the mistake i have done while posting the question

            sorry

            jsulmJ Online
            jsulmJ Online
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @seok So, this is a template and there is no reason for any errors...

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply
            0
            • jsulmJ jsulm

              @seok So, this is a template and there is no reason for any errors...

              S Offline
              S Offline
              seok
              wrote on last edited by
              #6

              @jsulm thank you i just read about the template parameters now only after you mentioned
              all this time i was thinking StorageType is a class name

              thank you for your time

              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