Important: Please read the Qt Code of Conduct -

What parentheses at the beginning mean?

  • Recently i faced some strange thing in examples of other people, this thing i don't remember in any book of c++ i've read, or tutuorials. Parentheses at the very beginning, what is that and how such thing named?


  • @Engelard

    I guess that this is a long pointer and the variable is not used further?

    It should have the same effect as


    Sometimes you may have an extra parameter in a parameter list which will trigger a complaint from compiler. In both cases you clarify to the compiler that you are aware of this. See Q_UNUSED

  • @koahnig definitely not. I was using such variables further(or what point of that var then), as i presumed - this work like some kind of conversion or so. I adding (TCHAR) or some other stuff before(from examples of others) and in that place variable converted to TCHAR.

    But i might be wrong, thats why i'm asking here.

  • @Engelard

    It is a C-style cast to an unspecified long pointer. When some more is around in the line you are casting to your needs.

    As you show it above you get rid of compile warnings.

Log in to reply