Results 1 to 2 of 2

Thread: Complex declaration[SOLVED?]

  1. #1
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Thumbs up Complex declaration[SOLVED?]

    Hi guys,
    I have a question: Could you help me with explaining this declaration:

    Qt Code:
    1. void (*signal(int num, void (*func)(int)))(int);
    To copy to clipboard, switch view to plain text mode 

    I thought it was:

    signal is a pointer to function returning nothing accepting two arguments, an int and a pointer func to a function returning nothing and accepting an int argument... but... I do not know what the last (int) stands for....

    Thanks.

    [SOLUTION]
    SIGNAL is a function taking 2 arguments( int, pointer to a function returning void and taking an int argument) and returning a pointer to a function taking int and returning void.


    AM I RIGHT?
    Last edited by maverick_pol; 27th May 2009 at 13:31.
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

  2. #2
    Join Date
    May 2007
    Location
    Lublin, Poland
    Posts
    345
    Thanks
    40
    Thanked 8 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Complex declaration[SOLVED?]

    I am quite sure the answer is correct, so this thread is closed.

    Hope this helps someone.

    Thanks.
    Qt allows you to use everything you want
    wysota
    --------------------------------------------------------------------------------
    #if defined(Q_OS_UNIX) && defined(QT_DEBUG)
    abort(); // trap; generates core dump
    #else
    exit(1); // goodbye cruel world
    #endif

Similar Threads

  1. static building qt, error: declaration of c function conflicts
    By BlueWizard in forum Installation and Deployment
    Replies: 4
    Last Post: 30th July 2010, 12:50
  2. Complex number
    By nbo10 in forum Qt Programming
    Replies: 1
    Last Post: 4th April 2009, 06:44
  3. problem with forward declaration
    By MarkoSan in forum General Programming
    Replies: 14
    Last Post: 6th January 2008, 21:45
  4. Complex Numbers
    By Max Yaffe in forum Qt Programming
    Replies: 2
    Last Post: 24th May 2007, 17:40
  5. QT4 layout of complex dialog is very slow
    By cboles in forum Qt Programming
    Replies: 15
    Last Post: 28th April 2006, 19:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.