H
heck
Grünschnabel
ok...
Take a look at the snippets below.
What does it mean a construct like:
void function()
type var;
{
funct code...
}
hmmm.. i dont get it. my compiler either.
void log_message(filename,message)
char *filename;
char *message;
{
FILE *logfile;
logfile=fopen(filename,"a");
if(!logfile) return;
fprintf(logfile,"%s\n",message);
fclose(logfile);
}
void signal_handler(sig)
int sig;
{
switch(sig) {
case SIGHUP:
log_message(LOG_FILE,"hangup signal catched");
break;
case SIGTERM:
log_message(LOG_FILE,"terminate signal catched");
exit(0);
break;
}
}
.
.
.
EDIT (autom. Beitragszusammenführung) :
.
sorry guys my "c" compiler gots it, i was too quick asking, i tried compile on C++ compiler.
But anyway i've never seen sth. like that, help me quick?
Take a look at the snippets below.
What does it mean a construct like:
void function()
type var;
{
funct code...
}
hmmm.. i dont get it. my compiler either.
void log_message(filename,message)
char *filename;
char *message;
{
FILE *logfile;
logfile=fopen(filename,"a");
if(!logfile) return;
fprintf(logfile,"%s\n",message);
fclose(logfile);
}
void signal_handler(sig)
int sig;
{
switch(sig) {
case SIGHUP:
log_message(LOG_FILE,"hangup signal catched");
break;
case SIGTERM:
log_message(LOG_FILE,"terminate signal catched");
exit(0);
break;
}
}
.
.
.
EDIT (autom. Beitragszusammenführung) :
.
sorry guys my "c" compiler gots it, i was too quick asking, i tried compile on C++ compiler.
But anyway i've never seen sth. like that, help me quick?
Zuletzt bearbeitet: