Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 10:18 on June 6, 2006


Signal translation pass?

LEAVES OF 13 SPECIES OF LAURACEAE ac for sco openserver 5.0.5 */

#include "Signal.h>;
Catch (int sig) (
Printf ( "sig=%d\n" sig);
}

Main ()
{
Int Rifa
Signal (SIGALRM, catch);
Alarm (10);
Scanf ( "%d" Martin);
Printf ( "i=%d", i);
}

LEAVES OF 13 SPECIES OF LAURACEAE cc ac -lc */

The second function suggest signal parameters are not matched with the prototype. Y

Signal translation pass?

You look at the signal parameters of what type of the second function pointer.

Signal translation pass?

This is a reference book on the case. In my loom, pass.

Withheld is how you use?

Signal translation pass?

Catch (int sig) (
Printf ( "sig=%d\n" sig); //!!
^^^^^^^^^^^^^^^^^^printf ( "Sig=%d\n" sig);
}

Signal translation pass?

It may be a long time ago, the void return type functions are not given, it would be best to add.

Signal translation pass?

1, the alarm () function defined in unistd.h documents;
2, a closer look at your printf (third um), the format problem

Amended as follows :
[code] 1 #include "signal.h>;
2 #include "unistd.h>;
3 #include "stdio.h>;
4 void catch (int sig)
      5 {
6 printf ( "sig=%d\n" sig);
      7 }
8
9 int main (void)
     10 {
11 int Rifa
12 signal (SIGALRM, catch);
13 alarm (1);
14 Scanf ( "%d" Martin);
15 printf ( "i is %d\n", i);
16 return 0
17 }[/code]

Signal translation pass?

: Lol :

Signal translation pass?

You bring the procedure less than 10 seconds, withdrew from the importation of the completed!

Signal translation pass?

Signal translation pass?

Calling the function should be
Void catch (int sig)
{
...
}

Int sig void will be warned or less suggested. Thank you, everybody.



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com