I'm doing a OS class.
Trying to implement this pseudo code:
* Forking is fun! Simple tips
First, fork the child process:
pid_t ForkPID;
ForkPID = fork();
Then write a quick switch statement!
switch (ForkPID) {
// -1, fork failure
case -1:
printf("Error: Failed to fork.\n"); break;
// 0, this is the child process
case 0:
break;
// > 0, parent process and the PID is the child's PID
default:
}
I get an error:
ForkEnc.cc:18: error: stray ‘\302’ in program
ForkEnc.cc:18: error: stray ‘\255’ in program
line 18 is:
case -1:
can someone help me out.