(void) objective indicator



  • I'm going through someone else's code and I'm on the following:

    CClientHandler* handler = new CClientHandler(sock, b);
    (void)handler;
    

    What does it do? (void) before the sign handler?



  • Species

    (void)handler;
    

    or

    handler;
    

    Usually used to get rid of the compiler's warnings, "Temporary... not used." If the index is used further by code, this line can be removed.

    https://stackoverflow.com/questions/21045615/what-does-voidvar-actually-do


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2