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. Include problem
Qt 6.11 is out! See what's new in the release blog

Include problem

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 797 Views 1 Watching
  • 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.
  • T Offline
    T Offline
    TrusT1234
    wrote on last edited by
    #1

    Hello,

    I have a problem by including classes. I try to include a class calls cfgreader in another class calls errhandler. Now the problem, the class errhandler requires as include the class cfgreader. For better understanding:

    cfgreader.h
    @#include "errhandler.h"@

    errhandler.h
    @#include "cfgreader.h"@

    I don't know how I can search this on the Internet, so maybe someone can help me or can give me a clue?

    Thank you!

    Best regards,
    TrusT

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

      Hi,

      That's called circular dependencies

      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
      • A Offline
        A Offline
        alex_malyu
        wrote on last edited by
        #3

        I would add your problem is circular dependencies,
        your solution is forward declaration.

        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